mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(frontend): persist search param label
This commit is contained in:
parent
1b5f530496
commit
34221ec5f1
@ -42,8 +42,9 @@ export const Labels = () => {
|
|||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
const dialogs = useDialogs();
|
const dialogs = useDialogs();
|
||||||
const hasPermission = useHasPermission();
|
const hasPermission = useHasPermission();
|
||||||
const { onSearch, searchPayload } = useSearch<ILabel>({
|
const { ref, onSearch, searchPayload } = useSearch<ILabel>({
|
||||||
$or: ["name", "title"],
|
$or: ["name", "title"],
|
||||||
|
queryParam: { key: "search", defaultValue: "" },
|
||||||
});
|
});
|
||||||
const { dataGridProps } = useFind(
|
const { dataGridProps } = useFind(
|
||||||
{ entity: EntityType.LABEL, format: Format.FULL },
|
{ entity: EntityType.LABEL, format: Format.FULL },
|
||||||
@ -173,7 +174,7 @@ export const Labels = () => {
|
|||||||
width="max-content"
|
width="max-content"
|
||||||
>
|
>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<FilterTextfield onChange={onSearch} />
|
<FilterTextfield inputRef={ref} onChange={onSearch} />
|
||||||
</Grid>
|
</Grid>
|
||||||
{hasPermission(EntityType.LABEL, PermissionAction.CREATE) ? (
|
{hasPermission(EntityType.LABEL, PermissionAction.CREATE) ? (
|
||||||
<Grid item>
|
<Grid item>
|
||||||
|
Loading…
Reference in New Issue
Block a user