indicator-ui 0.0.72 → 0.0.73
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/dist/index.js
CHANGED
|
@@ -9591,7 +9591,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9591
9591
|
setOptionsState(options);
|
|
9592
9592
|
}, [options]);
|
|
9593
9593
|
const handleChange = (data) => {
|
|
9594
|
-
optionsCacheRef.current = optionsState.filter(item => data.includes(item.value));
|
|
9594
|
+
optionsCacheRef.current = data.length > 0 ? optionsState.filter(item => data.includes(item.value)) : optionsState;
|
|
9595
9595
|
if (data.length === 0 && required) {
|
|
9596
9596
|
let newValue;
|
|
9597
9597
|
if (Array.isArray(value)) {
|
|
@@ -9600,7 +9600,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9600
9600
|
else {
|
|
9601
9601
|
newValue = value;
|
|
9602
9602
|
}
|
|
9603
|
-
onChange && onChange([newValue || optionsState[0]]);
|
|
9603
|
+
onChange && onChange([newValue || optionsState[0].value]);
|
|
9604
9604
|
}
|
|
9605
9605
|
else {
|
|
9606
9606
|
if (data.length > 1 && !multiple) {
|