Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32508817
D9776.1767088434.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9776.1767088434.diff
View Options
diff --git a/web/modals/threads/thread-picker-modal.react.js b/web/modals/threads/thread-picker-modal.react.js
--- a/web/modals/threads/thread-picker-modal.react.js
+++ b/web/modals/threads/thread-picker-modal.react.js
@@ -2,7 +2,6 @@
import invariant from 'invariant';
import * as React from 'react';
-import { createSelector } from 'reselect';
import { useGlobalThreadSearchIndex } from 'lib/selectors/nav-selectors.js';
import { onScreenEntryEditableThreadInfos } from 'lib/selectors/thread-selectors.js';
@@ -81,26 +80,12 @@
[searchIndex],
);
- const listDataSelector = createSelector(
- state => state.onScreenThreadInfos,
- state => state.searchText,
- state => state.searchResults,
- (
- threadInfos: $ReadOnlyArray<ThreadInfo>,
- text: string,
- results: Set<string>,
- ) =>
- text
- ? threadInfos.filter(threadInfo => results.has(threadInfo.id))
- : [...threadInfos],
- );
-
- const threads = useSelector(() =>
- listDataSelector({
- onScreenThreadInfos,
- searchText,
- searchResults,
- }),
+ const threads = React.useMemo(
+ () =>
+ searchText
+ ? onScreenThreadInfos.filter(thread => searchResults.has(thread.id))
+ : onScreenThreadInfos,
+ [searchText, onScreenThreadInfos, searchResults],
);
const threadPickerContent = React.useMemo(() => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 30, 9:53 AM (12 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5866910
Default Alt Text
D9776.1767088434.diff (1 KB)
Attached To
Mode
D9776: [Flow202][web][skip-ci] [10/x] Fix nonsensical use of selectors in ThreadPickerModal
Attached
Detach File
Event Timeline
Log In to Comment