mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(frontend): persist search param flow
This commit is contained in:
parent
1818f01437
commit
5a27ec3619
@ -43,8 +43,9 @@ export const Categories = () => {
|
||||
const { toast } = useToast();
|
||||
const dialogs = useDialogs();
|
||||
const hasPermission = useHasPermission();
|
||||
const { onSearch, searchPayload } = useSearch<ICategory>({
|
||||
const { ref, onSearch, searchPayload } = useSearch<ICategory>({
|
||||
$iLike: ["label"],
|
||||
queryParam: { key: "search", defaultValue: "" },
|
||||
});
|
||||
const { dataGridProps } = useFind(
|
||||
{ entity: EntityType.CATEGORY },
|
||||
@ -142,7 +143,7 @@ export const Categories = () => {
|
||||
width="max-content"
|
||||
>
|
||||
<Grid item>
|
||||
<FilterTextfield onChange={onSearch} />
|
||||
<FilterTextfield inputRef={ref} onChange={onSearch} />
|
||||
</Grid>
|
||||
{hasPermission(EntityType.CATEGORY, PermissionAction.CREATE) ? (
|
||||
<Grid item>
|
||||
|
Loading…
Reference in New Issue
Block a user