fix: remove unused event prop

This commit is contained in:
yassinedorbozgithub 2024-11-27 06:37:19 +01:00
parent 638b405bb0
commit fd1e23127e
2 changed files with 4 additions and 10 deletions

View File

@ -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),
);
}}

View File

@ -148,9 +148,7 @@ const PatternInput: FC<PatternInputProps> = ({
{patternType === "nlp" && (
<NlpPatternSelect
patterns={pattern as NlpPattern[]}
onChange={(_e, data) => {
setPattern(data);
}}
onChange={setPattern}
/>
)}
{patternType === "menu" ? (