indicator-ui 0.0.111 → 0.0.112
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 +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10106,7 +10106,11 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
10106
10106
|
}
|
|
10107
10107
|
};
|
|
10108
10108
|
}, []);
|
|
10109
|
+
const fillOptionsCache = (data) => {
|
|
10110
|
+
optionsCacheRef.current = data.length > 0 ? optionsState.filter(item => data.includes(item.value)) : optionsState;
|
|
10111
|
+
};
|
|
10109
10112
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
10113
|
+
fillOptionsCache(value);
|
|
10110
10114
|
if (!offInitLoadMoreOptions) {
|
|
10111
10115
|
onScrollToBottom();
|
|
10112
10116
|
}
|
|
@@ -10116,7 +10120,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
10116
10120
|
setOptionsState(options);
|
|
10117
10121
|
}, [options]);
|
|
10118
10122
|
const handleChange = (data) => {
|
|
10119
|
-
|
|
10123
|
+
fillOptionsCache(data);
|
|
10120
10124
|
if (data.length === 0 && required) {
|
|
10121
10125
|
let newValue;
|
|
10122
10126
|
if (Array.isArray(value)) {
|