Skip to content

Commit

Permalink
Merge pull request #4389 from Shenali-SJ/master
Browse files Browse the repository at this point in the history
Update user store filter functionality in the users section
  • Loading branch information
JayaShakthi97 authored Oct 27, 2023
2 parents 7689aab + 4c4ec4a commit 6a2b74b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-falcons-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/console": patch
---

Update user store filter functionality
8 changes: 6 additions & 2 deletions apps/console/src/features/users/pages/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,11 @@ const UsersPage: FunctionComponent<UsersPageInterface> = (
};

const handleDomainChange = (event: React.MouseEvent<HTMLAnchorElement>, data: DropdownProps) => {
setUserStore(data.value as string);
if (data.value === "all") {
setUserStore(null);
} else {
setUserStore(data.value as string);
}
};

const onUserDelete = (): void => {
Expand Down Expand Up @@ -753,11 +757,11 @@ const UsersPage: FunctionComponent<UsersPageInterface> = (
/>
<RootOnlyComponent>
<Dropdown
value={ userStore }
data-testid="user-mgt-user-list-userstore-dropdown"
selection
options={ userStoreOptions && userStoreOptions }
onChange={ handleDomainChange }
defaultValue="all"
/>
</RootOnlyComponent>
</>
Expand Down

0 comments on commit 6a2b74b

Please sign in to comment.