diff --git a/frontend/src/app-components/inputs/NlpPatternSelect.tsx b/frontend/src/app-components/inputs/NlpPatternSelect.tsx index e42e2ee..63b193b 100644 --- a/frontend/src/app-components/inputs/NlpPatternSelect.tsx +++ b/frontend/src/app-components/inputs/NlpPatternSelect.tsx @@ -32,10 +32,7 @@ import { INlpValue } from "@/types/nlp-value.types"; type NlpPatternSelectProps = { patterns: NlpPattern[]; - onChange: ( - _event: SyntheticEvent | undefined, - patterns: NlpPattern[], - ) => void; + onChange: (patterns: NlpPattern[]) => void; }; const NlpPatternSelect = ( @@ -76,7 +73,7 @@ const NlpPatternSelect = ( ), ]; - onChange(undefined, newSelection); + onChange(newSelection); }; const handleNlpValueChange = ( { id, name }: Pick, @@ -102,7 +99,7 @@ const NlpPatternSelect = ( update.value = value.value; } - onChange(undefined, newSelection); + onChange(newSelection); }; if (!options.length) { @@ -255,7 +252,6 @@ const NlpPatternSelect = ( onDelete(e); onChange( - undefined, patterns.filter((p) => p.entity !== name), ); }} diff --git a/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx b/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx index 5791f2d..0bab40f 100644 --- a/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx +++ b/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx @@ -148,9 +148,7 @@ const PatternInput: FC = ({ {patternType === "nlp" && ( { - setPattern(data); - }} + onChange={setPattern} /> )} {patternType === "menu" ? (