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 = {
|
||||
patterns: NlpPattern[];
|
||||
onChange: (
|
||||
_event: SyntheticEvent<Element, Event> | 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<INlpEntity, "id" | "name">,
|
||||
@ -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),
|
||||
);
|
||||
}}
|
||||
|
@ -148,9 +148,7 @@ const PatternInput: FC<PatternInputProps> = ({
|
||||
{patternType === "nlp" && (
|
||||
<NlpPatternSelect
|
||||
patterns={pattern as NlpPattern[]}
|
||||
onChange={(_e, data) => {
|
||||
setPattern(data);
|
||||
}}
|
||||
onChange={setPattern}
|
||||
/>
|
||||
)}
|
||||
{patternType === "menu" ? (
|
||||
|
Loading…
Reference in New Issue
Block a user