Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3493417
D4267.id13506.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.id13506.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;
+
+ // eslint-disable-next-line no-unused-vars
+ const [userStoreSearchResults, setUserStoreSearchResults] = React.useState<
+ $ReadOnlySet<string>,
+ >(new Set());
+ const userStoreSearchIndex = useSelector(userStoreSearchIndexSelector);
+ React.useEffect(() => {
+ setUserStoreSearchResults(
+ new Set(userStoreSearchIndex.getSearchResults(searchText)),
+ );
+ }, [searchText, userStoreSearchIndex]);
+
+ return null;
+}
+
+export default AddUsersList;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 3:19 AM (10 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679961
Default Alt Text
D4267.id13506.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