mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(frontend): persist search param nlpValue
This commit is contained in:
parent
92be4a3e3b
commit
8ed5188d0d
@ -51,9 +51,10 @@ export const NlpValues = ({ entityId }: { entityId: string }) => {
|
|||||||
entity: EntityType.NLP_ENTITY,
|
entity: EntityType.NLP_ENTITY,
|
||||||
format: Format.FULL,
|
format: Format.FULL,
|
||||||
});
|
});
|
||||||
const { onSearch, searchPayload } = useSearch<INlpValue>({
|
const { ref, onSearch, searchPayload } = useSearch<INlpValue>({
|
||||||
$eq: [{ entity: entityId }],
|
$eq: [{ entity: entityId }],
|
||||||
$or: ["doc", "value"],
|
$or: ["doc", "value"],
|
||||||
|
queryParam: { key: "search", defaultValue: "" },
|
||||||
});
|
});
|
||||||
const { dataGridProps } = useFind(
|
const { dataGridProps } = useFind(
|
||||||
{ entity: EntityType.NLP_VALUE, format: Format.FULL },
|
{ entity: EntityType.NLP_VALUE, format: Format.FULL },
|
||||||
@ -228,7 +229,7 @@ export const NlpValues = ({ entityId }: { entityId: string }) => {
|
|||||||
sx={{ width: "max-content", gap: 1 }}
|
sx={{ width: "max-content", gap: 1 }}
|
||||||
>
|
>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<FilterTextfield onChange={onSearch} />
|
<FilterTextfield inputRef={ref} onChange={onSearch} />
|
||||||
</Grid>
|
</Grid>
|
||||||
<ButtonGroup sx={{ marginLeft: "auto" }}>
|
<ButtonGroup sx={{ marginLeft: "auto" }}>
|
||||||
{hasPermission(
|
{hasPermission(
|
||||||
|
Loading…
Reference in New Issue
Block a user