x-ui-design 0.6.43 → 0.6.44

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
@@ -3699,38 +3699,6 @@ const SelectComponent = ({
3699
3699
  setSearchInputWidth(searchContent.clientWidth - PADDING_TAG_INPUT);
3700
3700
  }
3701
3701
  };
3702
- const dataRender = (() => {
3703
- const options = filteredOptions.map(({
3704
- children,
3705
- className = '',
3706
- ...props
3707
- }, index) => {
3708
- const isSelected = hasMode ? selected.includes(props.value) : props.value === selected;
3709
- return /*#__PURE__*/React.createElement(Option, _extends({
3710
- key: `${props.value}_${index}`
3711
- }, props, {
3712
- selected: isSelected,
3713
- className: clsx([className, {
3714
- [`${prefixCls}-focused`]: hasMode ? isSelected : props.value === selected,
3715
- [`${prefixCls}-disabled`]: maxCount && hasMode && !isSelected ? selected.length >= maxCount : false
3716
- }]),
3717
- onClick: e => {
3718
- if (props.disabled) {
3719
- return;
3720
- }
3721
- handleSelect(e, props.value, {
3722
- children,
3723
- className,
3724
- ...props
3725
- });
3726
- },
3727
- "data-value": props.value
3728
- }), children || props.label || props.value, menuItemSelectedIcon && hasMode && isSelected && /*#__PURE__*/React.createElement("span", {
3729
- className: `${prefixCls}-selected-icon`
3730
- }, menuItemSelectedIcon === true ? /*#__PURE__*/React.createElement(CheckIcon, null) : menuItemSelectedIcon));
3731
- });
3732
- return options;
3733
- })();
3734
3702
  const dropdownContent = !loading && open && isOpen && /*#__PURE__*/React.createElement("div", {
3735
3703
  className: clsx([`${prefixCls}-dropdown`, {
3736
3704
  [placement]: placement,
@@ -3772,7 +3740,35 @@ const SelectComponent = ({
3772
3740
  handleSelect(e, searchQuery);
3773
3741
  },
3774
3742
  "data-value": searchQuery
3775
- }, searchQuery), filteredOptions.length ? dataRender : !asTag ? notFoundContent || /*#__PURE__*/React.createElement(EmptyContent, null) : null)));
3743
+ }, searchQuery), filteredOptions.length ? filteredOptions.map(({
3744
+ children,
3745
+ className = '',
3746
+ ...props
3747
+ }, index) => {
3748
+ const isSelected = hasMode ? selected.includes(props.value) : props.value === selected;
3749
+ return /*#__PURE__*/React.createElement(Option, _extends({
3750
+ key: `${props.value}_${index}`
3751
+ }, props, {
3752
+ selected: isSelected,
3753
+ className: clsx([className, {
3754
+ [`${prefixCls}-focused`]: hasMode ? isSelected : props.value === selected,
3755
+ [`${prefixCls}-disabled`]: maxCount && hasMode && !isSelected ? selected.length >= maxCount : false
3756
+ }]),
3757
+ onClick: e => {
3758
+ if (props.disabled) {
3759
+ return;
3760
+ }
3761
+ handleSelect(e, props.value, {
3762
+ children,
3763
+ className,
3764
+ ...props
3765
+ });
3766
+ },
3767
+ "data-value": props.value
3768
+ }), children || props.label || props.value, menuItemSelectedIcon && hasMode && isSelected && /*#__PURE__*/React.createElement("span", {
3769
+ className: `${prefixCls}-selected-icon`
3770
+ }, menuItemSelectedIcon === true ? /*#__PURE__*/React.createElement(CheckIcon, null) : menuItemSelectedIcon));
3771
+ }) : !asTag ? notFoundContent || /*#__PURE__*/React.createElement(EmptyContent, null) : null)));
3776
3772
  const selectedOption = (() => {
3777
3773
  const option = extractedOptions.find(e => e.value === selected || e.label === selected || e.children === selected) || selected;
3778
3774
  return option?.children || option?.label || option?.value || null;