mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(frontend): persist search param contentType
This commit is contained in:
parent
dbf03088e2
commit
a61130d777
@ -40,8 +40,9 @@ export const ContentTypes = () => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const dialogs = useDialogs();
|
const dialogs = useDialogs();
|
||||||
// data fetching
|
// data fetching
|
||||||
const { onSearch, searchPayload } = useSearch<IContentType>({
|
const { ref, onSearch, searchPayload } = useSearch<IContentType>({
|
||||||
$iLike: ["name"],
|
$iLike: ["name"],
|
||||||
|
queryParam: { key: "search", defaultValue: "" },
|
||||||
});
|
});
|
||||||
const { dataGridProps } = useFind(
|
const { dataGridProps } = useFind(
|
||||||
{ entity: EntityType.CONTENT_TYPE },
|
{ entity: EntityType.CONTENT_TYPE },
|
||||||
@ -99,7 +100,7 @@ export const ContentTypes = () => {
|
|||||||
width="max-content"
|
width="max-content"
|
||||||
>
|
>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<FilterTextfield onChange={onSearch} />
|
<FilterTextfield inputRef={ref} onChange={onSearch} />
|
||||||
</Grid>
|
</Grid>
|
||||||
{hasPermission(EntityType.CONTENT_TYPE, PermissionAction.CREATE) ? (
|
{hasPermission(EntityType.CONTENT_TYPE, PermissionAction.CREATE) ? (
|
||||||
<Grid item>
|
<Grid item>
|
||||||
|
Loading…
Reference in New Issue
Block a user