mirror of
https://github.com/hexastack/hexabot
synced 2024-12-02 09:05:06 +00:00
fix: remove unused event prop
This commit is contained in:
parent
638b405bb0
commit
fd1e23127e
@ -32,10 +32,7 @@ import { INlpValue } from "@/types/nlp-value.types";
|
|||||||
|
|
||||||
type NlpPatternSelectProps = {
|
type NlpPatternSelectProps = {
|
||||||
patterns: NlpPattern[];
|
patterns: NlpPattern[];
|
||||||
onChange: (
|
onChange: (patterns: NlpPattern[]) => void;
|
||||||
_event: SyntheticEvent<Element, Event> | undefined,
|
|
||||||
patterns: NlpPattern[],
|
|
||||||
) => void;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const NlpPatternSelect = (
|
const NlpPatternSelect = (
|
||||||
@ -76,7 +73,7 @@ const NlpPatternSelect = (
|
|||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
onChange(undefined, newSelection);
|
onChange(newSelection);
|
||||||
};
|
};
|
||||||
const handleNlpValueChange = (
|
const handleNlpValueChange = (
|
||||||
{ id, name }: Pick<INlpEntity, "id" | "name">,
|
{ id, name }: Pick<INlpEntity, "id" | "name">,
|
||||||
@ -102,7 +99,7 @@ const NlpPatternSelect = (
|
|||||||
update.value = value.value;
|
update.value = value.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange(undefined, newSelection);
|
onChange(newSelection);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!options.length) {
|
if (!options.length) {
|
||||||
@ -255,7 +252,6 @@ const NlpPatternSelect = (
|
|||||||
onDelete(e);
|
onDelete(e);
|
||||||
|
|
||||||
onChange(
|
onChange(
|
||||||
undefined,
|
|
||||||
patterns.filter((p) => p.entity !== name),
|
patterns.filter((p) => p.entity !== name),
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
@ -148,9 +148,7 @@ const PatternInput: FC<PatternInputProps> = ({
|
|||||||
{patternType === "nlp" && (
|
{patternType === "nlp" && (
|
||||||
<NlpPatternSelect
|
<NlpPatternSelect
|
||||||
patterns={pattern as NlpPattern[]}
|
patterns={pattern as NlpPattern[]}
|
||||||
onChange={(_e, data) => {
|
onChange={setPattern}
|
||||||
setPattern(data);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{patternType === "menu" ? (
|
{patternType === "menu" ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user