x-ui-design 0.5.27 → 0.5.29

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
@@ -3666,13 +3666,13 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3666
3666
  if (maxTagCount === 'responsive' && tagContainerRef.current) {
3667
3667
  const calculateTagsToDisplay = () => {
3668
3668
  const container = tagContainerRef.current;
3669
- const tags = Array.from(container?.querySelectorAll('.select-tag') || []);
3669
+ const tags = Array.from(container?.querySelectorAll(`.${prefixCls}-tag:not(.contentEditable)`) || []);
3670
3670
  const containerWidth = container?.clientWidth || 0;
3671
3671
  let currentWidth = 0;
3672
3672
  let count = 0;
3673
3673
  for (let i = 0; i < tags.length; i++) {
3674
3674
  const tag = tags[i];
3675
- currentWidth += tag.offsetWidth + 4; // 4px is the margin-right
3675
+ currentWidth += tag.offsetWidth + 32;
3676
3676
  if (currentWidth < containerWidth) {
3677
3677
  count++;
3678
3678
  } else {
@@ -3747,10 +3747,9 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3747
3747
  opacity: 0.5
3748
3748
  }
3749
3749
  }, searchFocused ? '' : placeholder)) : null, isOpen ? /*#__PURE__*/React.createElement("div", {
3750
- className: `${prefixCls}-tag`
3750
+ className: `${prefixCls}-tag contentEditable`
3751
3751
  }, /*#__PURE__*/React.createElement("div", _extends({
3752
- ref: searchInputRef // Ref to the search input
3753
- ,
3752
+ ref: searchInputRef,
3754
3753
  onClick: e => {
3755
3754
  if (disabled) {
3756
3755
  e.preventDefault();