@uxf/ui 1.0.0-beta.151 → 1.0.0-beta.152

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.
@@ -42,6 +42,7 @@ exports._MultiSelectBase = (0, react_2.forwardRef)((props, ref) => {
42
42
  const stableRef = (0, react_2.useMemo)(() => (0, composeRefs_1.composeRefs)(innerRef, ref, dropdown.reference), [ref, dropdown.reference]);
43
43
  const iconName = (_b = props.iconName) !== null && _b !== void 0 ? _b : "chevronDown";
44
44
  const selectedOptions = (_c = props.value) !== null && _c !== void 0 ? _c : [];
45
+ const filteredOptions = props.options.filter((option) => !selectedOptions.map((i) => i.id).includes(option.id));
45
46
  const handleSelectValueChange = (v) => {
46
47
  props.onChange(v.map((option) => option));
47
48
  };
@@ -59,7 +60,7 @@ exports._MultiSelectBase = (0, react_2.forwardRef)((props, ref) => {
59
60
  ? props.placeholder
60
61
  : selectedOptions.map((item) => (react_2.default.createElement(chip_1.Chip, { className: "uxf-multi-combobox__input-chip", color: item.color, key: item.id, onClose: handleRemove(item.id), size: "large", suppressFocus: true }, item.label)))),
61
62
  react_2.default.createElement(icon_1.Icon, { className: (0, cx_1.cx)("uxf-select__button-icon", renderProps.open && "is-open"), name: iconName })),
62
- react_2.default.createElement(react_1.Listbox.Options, { className: (0, cx_1.cx)("uxf-dropdown", dropdown.placement === "bottom" && "uxf-dropdown--bottom", dropdown.placement === "top" && "uxf-dropdown--top"), ref: dropdown.floating, static: props.withPopover }, props.options.map((option) => {
63
+ react_2.default.createElement(react_1.Listbox.Options, { className: (0, cx_1.cx)("uxf-dropdown", dropdown.placement === "bottom" && "uxf-dropdown--bottom", dropdown.placement === "top" && "uxf-dropdown--top"), ref: dropdown.floating, static: props.withPopover }, filteredOptions.map((option) => {
63
64
  var _a;
64
65
  const optionKey = (_a = props.keyExtractor) === null || _a === void 0 ? void 0 : _a.call(props, option);
65
66
  return (react_2.default.createElement(react_1.Listbox.Option, { className: (optionState) => (0, cx_1.cx)("uxf-dropdown__item uxf-multi-select__dropdown-item", optionState.active && classes_1.CLASSES.IS_ACTIVE, optionState.disabled && classes_1.CLASSES.IS_DISABLED, optionState.selected && classes_1.CLASSES.IS_SELECTED), key: optionKey !== null && optionKey !== void 0 ? optionKey : option.id, value: option }, optionKey !== null && optionKey !== void 0 ? optionKey : option.label));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/ui",
3
- "version": "1.0.0-beta.151",
3
+ "version": "1.0.0-beta.152",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "public"