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 { toast } = useToast();
|
||||||
const dialogs = useDialogs();
|
const dialogs = useDialogs();
|
||||||
const hasPermission = useHasPermission();
|
const hasPermission = useHasPermission();
|
||||||
const { onSearch, searchPayload } = useSearch<ICategory>({
|
const { ref, onSearch, searchPayload } = useSearch<ICategory>({
|
||||||
$iLike: ["label"],
|
$iLike: ["label"],
|
||||||
|
queryParam: { key: "search", defaultValue: "" },
|
||||||
});
|
});
|
||||||
const { dataGridProps } = useFind(
|
const { dataGridProps } = useFind(
|
||||||
{ entity: EntityType.CATEGORY },
|
{ entity: EntityType.CATEGORY },
|
||||||
@ -142,7 +143,7 @@ export const Categories = () => {
|
|||||||
width="max-content"
|
width="max-content"
|
||||||
>
|
>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<FilterTextfield onChange={onSearch} />
|
<FilterTextfield inputRef={ref} onChange={onSearch} />
|
||||||
</Grid>
|
</Grid>
|
||||||
{hasPermission(EntityType.CATEGORY, PermissionAction.CREATE) ? (
|
{hasPermission(EntityType.CATEGORY, PermissionAction.CREATE) ? (
|
||||||
<Grid item>
|
<Grid item>
|
||||||
|
Loading…
Reference in New Issue
Block a user