@xqmsg/ui-core 0.16.2 → 0.16.3
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/ui-core.cjs.development.js +8 -2
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +8 -2
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedMultiSelect/index.tsx +8 -1
package/dist/ui-core.esm.js
CHANGED
|
@@ -968,9 +968,15 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
968
968
|
return options.find(function (option) {
|
|
969
969
|
return option.value === value;
|
|
970
970
|
});
|
|
971
|
-
}));
|
|
971
|
+
})); // Filter out options that are already selected
|
|
972
|
+
|
|
973
|
+
setLocalOptions(function (prevLocalOptions) {
|
|
974
|
+
return prevLocalOptions.filter(function (localOption) {
|
|
975
|
+
return !localValues.includes(localOption);
|
|
976
|
+
});
|
|
977
|
+
});
|
|
972
978
|
}
|
|
973
|
-
}, [options, shouldSideScroll, watchedValue]);
|
|
979
|
+
}, [localValues, options, shouldSideScroll, watchedValue]);
|
|
974
980
|
|
|
975
981
|
var handleChange = function handleChange(option) {
|
|
976
982
|
setShouldSideScroll(true);
|