From 34221ec5f1ff093eda2e3fffbe6067e6b84572e1 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Mon, 26 May 2025 17:15:25 +0100 Subject: [PATCH] fix(frontend): persist search param label --- frontend/src/components/labels/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/labels/index.tsx b/frontend/src/components/labels/index.tsx index 1661ffc7..0434a444 100644 --- a/frontend/src/components/labels/index.tsx +++ b/frontend/src/components/labels/index.tsx @@ -42,8 +42,9 @@ export const Labels = () => { const { toast } = useToast(); const dialogs = useDialogs(); const hasPermission = useHasPermission(); - const { onSearch, searchPayload } = useSearch({ + const { ref, onSearch, searchPayload } = useSearch({ $or: ["name", "title"], + queryParam: { key: "search", defaultValue: "" }, }); const { dataGridProps } = useFind( { entity: EntityType.LABEL, format: Format.FULL }, @@ -173,7 +174,7 @@ export const Labels = () => { width="max-content" > - + {hasPermission(EntityType.LABEL, PermissionAction.CREATE) ? (