mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 15:36:18 +00:00
Merge remote-tracking branch 'upstream/Dev' into Dev
# Conflicts: # src/hooks/navigator/useNavigatorSearch.ts
This commit is contained in:
@@ -5,7 +5,20 @@ import { SendMessageComposer } from '../../api';
|
||||
import { useMessageEvent } from '../events';
|
||||
import { useNavigatorUiStore } from './navigatorUiStore';
|
||||
|
||||
|
||||
/**
|
||||
* Navigator search hook.
|
||||
*
|
||||
* Fires NavigatorSearchComposer(tabCode, filter) whenever the active tab
|
||||
* or filter changes (skipped when tabCode is '' — initial state, before
|
||||
* metadata arrives). Holds the latest NavigatorSearchResultSet that
|
||||
* matches the active tab.
|
||||
*
|
||||
* The TanStack Query variant (see useNitroQuery) was tried earlier but
|
||||
* its one-shot listener doesn't always reach NavigatorSearchEvent in
|
||||
* production builds with older renderer SDKs; the persistent
|
||||
* useMessageEvent listener used here matches the rest of the codebase
|
||||
* and reliably catches every server push.
|
||||
*/
|
||||
export const useNavigatorSearch = () =>
|
||||
{
|
||||
const tabCode = useNavigatorUiStore(s => s.currentTabCode);
|
||||
|
||||
Reference in New Issue
Block a user