mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 15:02:05 -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;
|
profile: UserProfileConfig;
|
||||||
createAttributeSearchChips: () => ReactNode;
|
createAttributeSearchChips: () => ReactNode;
|
||||||
searchUserWithAttributes: () => void;
|
searchUserWithAttributes: () => void;
|
||||||
|
clearAllFilters: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
type UserFilterForm = UserAttribute & { exact: boolean };
|
type UserFilterForm = UserAttribute & { exact: boolean };
|
||||||
@ -43,6 +44,7 @@ export function UserDataTableAttributeSearchForm({
|
|||||||
profile,
|
profile,
|
||||||
createAttributeSearchChips,
|
createAttributeSearchChips,
|
||||||
searchUserWithAttributes,
|
searchUserWithAttributes,
|
||||||
|
clearAllFilters,
|
||||||
}: UserDataTableAttributeSearchFormProps) {
|
}: UserDataTableAttributeSearchFormProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { addAlert } = useAlerts();
|
const { addAlert } = useAlerts();
|
||||||
@ -134,6 +136,7 @@ export function UserDataTableAttributeSearchForm({
|
|||||||
(chip) => chip.name !== chip.name,
|
(chip) => chip.name !== chip.name,
|
||||||
);
|
);
|
||||||
setActiveFilters({ ...activeFilters, userAttribute: filtered });
|
setActiveFilters({ ...activeFilters, userAttribute: filtered });
|
||||||
|
clearAllFilters();
|
||||||
};
|
};
|
||||||
|
|
||||||
const createAttributeKeyInputField = () => {
|
const createAttributeKeyInputField = () => {
|
||||||
|
|||||||
@ -137,6 +137,7 @@ export function UserDataTableToolbarItems({
|
|||||||
setActiveFilters={setActiveFilters}
|
setActiveFilters={setActiveFilters}
|
||||||
profile={profile}
|
profile={profile}
|
||||||
createAttributeSearchChips={createAttributeSearchChips}
|
createAttributeSearchChips={createAttributeSearchChips}
|
||||||
|
clearAllFilters={clearAllFilters}
|
||||||
searchUserWithAttributes={() => {
|
searchUserWithAttributes={() => {
|
||||||
searchUserWithAttributes();
|
searchUserWithAttributes();
|
||||||
setSearchDropdownOpen(false);
|
setSearchDropdownOpen(false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user