@scripso-homepad/ui 0.4.21 → 0.4.22

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.cjs CHANGED
@@ -1413,7 +1413,8 @@ function Select({
1413
1413
  labelClassName,
1414
1414
  errorClassName,
1415
1415
  hintClassName,
1416
- compact = false
1416
+ compact = false,
1417
+ allowDeselect = true
1417
1418
  }) {
1418
1419
  const wrapperRef = react.useRef(null);
1419
1420
  const triggerRef = react.useRef(null);
@@ -1517,6 +1518,9 @@ function Select({
1517
1518
  return;
1518
1519
  }
1519
1520
  if (selectedValues.includes(nextValue)) {
1521
+ if (allowDeselect) {
1522
+ onValueChange?.("");
1523
+ }
1520
1524
  closeMenu();
1521
1525
  return;
1522
1526
  }