fix: check compatiblity after delete selecor

This commit is contained in:
jialin
2025-04-05 10:42:24 +08:00
parent a23f9881ee
commit 9f24e765be
6 changed files with 34 additions and 11 deletions
+3
View File
@@ -16,6 +16,7 @@ interface ListInputProps {
labelExtra?: React.ReactNode;
onChange: (data: string[]) => void;
onBlur?: (e: any, index: number) => void;
onDelete?: (index: number) => void;
}
const ListInput: React.FC<ListInputProps> = (props) => {
@@ -26,6 +27,7 @@ const ListInput: React.FC<ListInputProps> = (props) => {
description,
onChange,
onBlur,
onDelete,
btnText,
options,
labelExtra
@@ -44,6 +46,7 @@ const ListInput: React.FC<ListInputProps> = (props) => {
const valueList = _.map(values, 'value').filter((val: string) => !!val);
setList(values);
onChange(valueList);
onDelete?.(index);
};
const handleOnChange = (value: string, index: number) => {