x-ui-design 0.4.49 → 0.4.50

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.esm.js CHANGED
@@ -3444,11 +3444,10 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3444
3444
  }
3445
3445
  if (e.key === 'Backspace') {
3446
3446
  if (hasMode && !e.target.value.trim().length) {
3447
- handleRemoveTag({
3448
- target: {
3449
- value: selected[selected.length - 1]
3450
- }
3451
- });
3447
+ const updatedSelected = hasMode ? selected.filter(item => item !== selected[selected.length - 1]) : e.target.value.trim();
3448
+ onDeselect?.(e.target.value);
3449
+ onChange?.(updatedSelected);
3450
+ setSelected(updatedSelected);
3452
3451
  }
3453
3452
  }
3454
3453
  clearTimeout(timeout);