next-helios-fe 1.8.31 → 1.8.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -29,8 +29,16 @@ export interface MultipleSelectProps
|
|
29
29
|
value: string[];
|
30
30
|
};
|
31
31
|
}) => void;
|
32
|
-
onSelect?: (
|
33
|
-
|
32
|
+
onSelect?: (e: {
|
33
|
+
target: {
|
34
|
+
value: string;
|
35
|
+
};
|
36
|
+
}) => void;
|
37
|
+
onRemove?: (e: {
|
38
|
+
target: {
|
39
|
+
value: string;
|
40
|
+
};
|
41
|
+
}) => void;
|
34
42
|
}
|
35
43
|
|
36
44
|
export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
@@ -75,7 +83,8 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
75
83
|
useEffect(() => {
|
76
84
|
if (value?.length) {
|
77
85
|
setTempValue(value);
|
78
|
-
|
86
|
+
} else {
|
87
|
+
setTempValue([]);
|
79
88
|
}
|
80
89
|
}, [value]);
|
81
90
|
|
@@ -206,7 +215,11 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
206
215
|
} as any);
|
207
216
|
}
|
208
217
|
if (onRemove) {
|
209
|
-
onRemove(
|
218
|
+
onRemove({
|
219
|
+
target: {
|
220
|
+
value: item,
|
221
|
+
},
|
222
|
+
});
|
210
223
|
}
|
211
224
|
}
|
212
225
|
}}
|
@@ -262,7 +275,9 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
262
275
|
} as any);
|
263
276
|
}
|
264
277
|
if (onSelect) {
|
265
|
-
onSelect(
|
278
|
+
onSelect({
|
279
|
+
target: { value: item.value },
|
280
|
+
});
|
266
281
|
}
|
267
282
|
}}
|
268
283
|
>
|