Page MenuHomePhabricator

D4267.diff
No OneTemporary

D4267.diff

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

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)

Event Timeline