Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3488041
D4306.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
D4306.diff
View Options
diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
--- a/web/settings/relationship/add-users-list.react.js
+++ b/web/settings/relationship/add-users-list.react.js
@@ -4,6 +4,7 @@
import { searchUsers } from 'lib/actions/user-actions.js';
import { userStoreSearchIndex as userStoreSearchIndexSelector } from 'lib/selectors/user-selectors.js';
+import type { UserRelationshipStatus } from 'lib/types/relationship-types.js';
import type { GlobalAccountUserInfo } from 'lib/types/user-types.js';
import { useServerCall } from 'lib/utils/action-utils.js';
@@ -11,10 +12,11 @@
type Props = {
+searchText: string,
+ +excludedStatuses?: $ReadOnlySet<UserRelationshipStatus>,
};
function AddUsersList(props: Props): React.Node {
- const { searchText } = props;
+ const { searchText, excludedStatuses = new Set() } = props;
const userStoreSearchIndex = useSelector(userStoreSearchIndexSelector);
const [userStoreSearchResults, setUserStoreSearchResults] = React.useState<
@@ -73,8 +75,9 @@
() =>
Object.keys(mergedUserInfos)
.map(userID => mergedUserInfos[userID])
+ .filter(user => !excludedStatuses.has(user.relationshipStatus))
.sort((user1, user2) => user1.username.localeCompare(user2.username)),
- [mergedUserInfos],
+ [excludedStatuses, mergedUserInfos],
);
return null;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 8:49 AM (20 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2676433
Default Alt Text
D4306.diff (1 KB)
Attached To
Mode
D4306: [web] Add option to filter users by status
Attached
Detach File
Event Timeline
Log In to Comment