Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3323272
D9297.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
637 B
Referenced Files
None
Subscribers
None
D9297.diff
View Options
diff --git a/lib/hooks/search-threads.js b/lib/hooks/search-threads.js
--- a/lib/hooks/search-threads.js
+++ b/lib/hooks/search-threads.js
@@ -102,10 +102,12 @@
function useSearchSubchannels(
threadInfo: ThreadInfo,
): SearchThreadsResult<ChatThreadItem> {
- const childThreadInfos = useFilteredChatListData(
+ const filterFunc = React.useCallback(
(thread: ?(ThreadInfo | RawThreadInfo)) =>
threadIsChannel(thread) && thread?.parentThreadID === threadInfo.id,
+ [threadInfo.id],
);
+ const childThreadInfos = useFilteredChatListData(filterFunc);
return useSearchThreads(threadInfo, childThreadInfos);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 3:29 AM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2548606
Default Alt Text
D9297.diff (637 B)
Attached To
Mode
D9297: [lib] Fix memoization of useSearchSidebars
Attached
Detach File
Event Timeline
Log In to Comment