Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3488392
D4267.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4267.diff
View Options
diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
new file mode 100644
--- /dev/null
+++ b/web/settings/relationship/add-users-list.react.js
@@ -0,0 +1,30 @@
+// @flow
+
+import * as React from 'react';
+
+import { userStoreSearchIndex as userStoreSearchIndexSelector } from 'lib/selectors/user-selectors.js';
+
+import { useSelector } from '../../redux/redux-utils.js';
+
+type Props = {
+ +searchText: string,
+};
+
+function AddUsersList(props: Props): React.Node {
+ const { searchText } = props;
+
+ const userStoreSearchIndex = useSelector(userStoreSearchIndexSelector);
+ // eslint-disable-next-line no-unused-vars
+ const [userStoreSearchResults, setUserStoreSearchResults] = React.useState<
+ $ReadOnlySet<string>,
+ >(new Set(userStoreSearchIndex.getSearchResults(searchText)));
+ React.useEffect(() => {
+ setUserStoreSearchResults(
+ new Set(userStoreSearchIndex.getSearchResults(searchText)),
+ );
+ }, [searchText, userStoreSearchIndex]);
+
+ return null;
+}
+
+export default AddUsersList;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 9:51 AM (20 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2676653
Default Alt Text
D4267.diff (1 KB)
Attached To
Mode
D4267: [web] Create AddUsersList component that fetches users from the store
Attached
Detach File
Event Timeline
Log In to Comment