@douyinfe/semi-ui 2.7.0-beta.0 → 2.7.0

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.
@@ -73694,9 +73694,10 @@ class group_TagGroup extends external_root_React_commonjs2_react_commonjs_react_
73694
73694
  renderMergeTags(tags) {
73695
73695
  const {
73696
73696
  maxTagCount,
73697
- tagList
73697
+ tagList,
73698
+ restCount
73698
73699
  } = this.props;
73699
- const n = tagList.length - maxTagCount;
73700
+ const n = restCount ? restCount : tagList.length - maxTagCount;
73700
73701
  let renderTags = tags;
73701
73702
 
73702
73703
  const normalTags = slice_default()(tags).call(tags, 0, maxTagCount);
@@ -73776,6 +73777,7 @@ group_TagGroup.propTypes = {
73776
73777
  style: prop_types_default.a.object,
73777
73778
  className: prop_types_default.a.string,
73778
73779
  maxTagCount: prop_types_default.a.number,
73780
+ restCount: prop_types_default.a.number,
73779
73781
  tagList: prop_types_default.a.array,
73780
73782
  size: prop_types_default.a.oneOf(group_tagSize),
73781
73783
  mode: prop_types_default.a.string,
@@ -74640,7 +74642,9 @@ class select_Select extends baseComponent_BaseComponent {
74640
74642
  });
74641
74643
  }
74642
74644
 
74643
- const tags = map_default()(selectedItems).call(selectedItems, (item, i) => {
74645
+ const mapItems = maxTagCount ? slice_default()(selectedItems).call(selectedItems, 0, maxTagCount) : selectedItems; // no need to render rest tag when maxTagCount is setting
74646
+
74647
+ const tags = map_default()(mapItems).call(mapItems, (item, i) => {
74644
74648
  const label = item[0];
74645
74649
  const {
74646
74650
  value
@@ -74699,12 +74703,13 @@ class select_Select extends baseComponent_BaseComponent {
74699
74703
  const placeholderText = placeholder && !inputValue ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
74700
74704
  className: spanCls
74701
74705
  }, placeholder) : null;
74702
- const n = tags.length > maxTagCount ? maxTagCount : undefined;
74706
+ const n = selectedItems.length > maxTagCount ? maxTagCount : undefined;
74703
74707
  const NotOneLine = !maxTagCount; // Multiple lines (that is, do not set maxTagCount), do not use TagGroup, directly traverse with Tag, otherwise Input cannot follow the correct position
74704
74708
 
74705
74709
  const tagContent = NotOneLine ? tags : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(group_TagGroup, {
74706
74710
  tagList: tags,
74707
74711
  maxTagCount: n,
74712
+ restCount: maxTagCount ? selectedItems.length - maxTagCount : undefined,
74708
74713
  size: "large",
74709
74714
  mode: "custom"
74710
74715
  });
@@ -76706,6 +76711,12 @@ class radioGroup_RadioGroup extends baseComponent_BaseComponent {
76706
76711
  }
76707
76712
 
76708
76713
  componentDidUpdate(prevProps) {
76714
+ if (typeof prevProps.value === 'number' && isNaN(prevProps.value) && typeof this.props.value === 'number' && isNaN(this.props.value)) {
76715
+ // `NaN === NaN` returns false, and this will fail the next if check
76716
+ // therefore triggering an infinite loop
76717
+ return;
76718
+ }
76719
+
76709
76720
  if (prevProps.value !== this.props.value) {
76710
76721
  this.foundation.handlePropValueChange(this.props.value);
76711
76722
  }
@@ -93046,6 +93057,7 @@ class nodeList_NodeList extends external_root_React_commonjs2_react_commonjs_rea
93046
93057
  super(props);
93047
93058
 
93048
93059
  this.onMotionEnd = () => {
93060
+ typeof this.props.onMotionEnd === 'function' && this.props.onMotionEnd();
93049
93061
  this.setState({
93050
93062
  transitionNodes: []
93051
93063
  });
@@ -95692,6 +95704,10 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
95692
95704
  this.clickOutsideHandler = null;
95693
95705
  this.foundation = new foundation_TreeSelectFoundation(this.adapter);
95694
95706
  this.treeSelectID = slice_default()(_context2 = Math.random().toString(36)).call(_context2, 2);
95707
+
95708
+ this.onMotionEnd = () => {
95709
+ this.adapter.rePositionDropdown();
95710
+ };
95695
95711
  } // eslint-disable-next-line max-lines-per-function
95696
95712
 
95697
95713