mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-07 14:02:04 -03:30
fix: clear all filters when resetting attribute search (#45109)
Closes #45108 Signed-off-by: Muhammed Oguz <muhammed0748@outlook.com>
This commit is contained in:
parent
f938d894b9
commit
12d4146eb9
@ -33,6 +33,7 @@ type UserDataTableAttributeSearchFormProps = {
|
||||
profile: UserProfileConfig;
|
||||
createAttributeSearchChips: () => ReactNode;
|
||||
searchUserWithAttributes: () => void;
|
||||
clearAllFilters: () => void;
|
||||
};
|
||||
|
||||
type UserFilterForm = UserAttribute & { exact: boolean };
|
||||
@ -43,6 +44,7 @@ export function UserDataTableAttributeSearchForm({
|
||||
profile,
|
||||
createAttributeSearchChips,
|
||||
searchUserWithAttributes,
|
||||
clearAllFilters,
|
||||
}: UserDataTableAttributeSearchFormProps) {
|
||||
const { t } = useTranslation();
|
||||
const { addAlert } = useAlerts();
|
||||
@ -134,6 +136,7 @@ export function UserDataTableAttributeSearchForm({
|
||||
(chip) => chip.name !== chip.name,
|
||||
);
|
||||
setActiveFilters({ ...activeFilters, userAttribute: filtered });
|
||||
clearAllFilters();
|
||||
};
|
||||
|
||||
const createAttributeKeyInputField = () => {
|
||||
|
||||
@ -137,6 +137,7 @@ export function UserDataTableToolbarItems({
|
||||
setActiveFilters={setActiveFilters}
|
||||
profile={profile}
|
||||
createAttributeSearchChips={createAttributeSearchChips}
|
||||
clearAllFilters={clearAllFilters}
|
||||
searchUserWithAttributes={() => {
|
||||
searchUserWithAttributes();
|
||||
setSearchDropdownOpen(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user