@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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.16.2",
2
+ "version": "0.16.3",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -94,8 +94,15 @@ const StackedMultiSelect = React.forwardRef<
94
94
  options.find(option => option.value === value)
95
95
  )
96
96
  );
97
+
98
+ // Filter out options that are already selected
99
+ setLocalOptions(prevLocalOptions =>
100
+ prevLocalOptions.filter(
101
+ localOption => !localValues.includes(localOption)
102
+ )
103
+ );
97
104
  }
98
- }, [options, shouldSideScroll, watchedValue]);
105
+ }, [localValues, options, shouldSideScroll, watchedValue]);
99
106
 
100
107
  const handleChange = (option: FieldOption) => {
101
108
  setShouldSideScroll(true);