@douyinfe/semi-ui 2.45.0-beta.0 → 2.45.1
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/css/semi.css +1 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +6 -6
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/select/index.js +3 -3
- package/lib/cjs/tree/index.js +1 -1
- package/lib/cjs/treeSelect/index.js +1 -1
- package/lib/es/select/index.js +3 -3
- package/lib/es/tree/index.js +1 -1
- package/lib/es/treeSelect/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/select/index.js
CHANGED
|
@@ -843,9 +843,8 @@ class Select extends _baseComponent.default {
|
|
|
843
843
|
const {
|
|
844
844
|
maxTagCount
|
|
845
845
|
} = this.props;
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
if (items.length > 1 && overflowItemCount !== newOverFlowItemCount) {
|
|
846
|
+
const newOverFlowItemCount = selections.size - maxTagCount > 0 ? selections.size - maxTagCount + items.length - 1 : items.length - 1;
|
|
847
|
+
if (overflowItemCount !== newOverFlowItemCount) {
|
|
849
848
|
this.foundation.updateOverflowItemCount(selections.size, newOverFlowItemCount);
|
|
850
849
|
}
|
|
851
850
|
}
|
|
@@ -858,6 +857,7 @@ class Select extends _baseComponent.default {
|
|
|
858
857
|
className: `${prefixcls}-content-wrapper-collapse`
|
|
859
858
|
}, /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
860
859
|
items: normalTags,
|
|
860
|
+
key: String(selections.length),
|
|
861
861
|
overflowRenderer: overflowItems => this.renderOverflow(overflowItems, length - 1),
|
|
862
862
|
onOverflow: overflowItems => this.handleOverflow(overflowItems),
|
|
863
863
|
visibleItemRenderer: (item, index) => this.renderTag(item, index)
|
package/lib/cjs/tree/index.js
CHANGED
|
@@ -403,7 +403,7 @@ class Tree extends _baseComponent.default {
|
|
|
403
403
|
if (props.value) {
|
|
404
404
|
checkedKeyValues = (0, _treeUtil.findKeysForValues)((0, _treeUtil.normalizeValue)(props.value, withObject) || [], valueEntities, isMultiple);
|
|
405
405
|
} else {
|
|
406
|
-
checkedKeyValues = (0, _treeUtil.updateKeys)(prevState.checkedKeys, keyEntities);
|
|
406
|
+
checkedKeyValues = (0, _treeUtil.updateKeys)(props.checkRelation === 'related' ? prevState.checkedKeys : prevState.realCheckedKeys, keyEntities);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
if (checkedKeyValues) {
|
|
@@ -968,7 +968,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
968
968
|
if (props.value) {
|
|
969
969
|
checkedKeyValues = (0, _treeUtil.findKeysForValues)((0, _treeUtil.normalizeValue)(props.value, withObject) || [], valueEntities, isMultiple);
|
|
970
970
|
} else {
|
|
971
|
-
checkedKeyValues = (0, _treeUtil.updateKeys)(prevState.checkedKeys, keyEntities);
|
|
971
|
+
checkedKeyValues = (0, _treeUtil.updateKeys)(props.checkRelation === 'related' ? prevState.checkedKeys : prevState.realCheckedKeys, keyEntities);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
if (checkedKeyValues) {
|
package/lib/es/select/index.js
CHANGED
|
@@ -834,9 +834,8 @@ class Select extends BaseComponent {
|
|
|
834
834
|
const {
|
|
835
835
|
maxTagCount
|
|
836
836
|
} = this.props;
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
if (items.length > 1 && overflowItemCount !== newOverFlowItemCount) {
|
|
837
|
+
const newOverFlowItemCount = selections.size - maxTagCount > 0 ? selections.size - maxTagCount + items.length - 1 : items.length - 1;
|
|
838
|
+
if (overflowItemCount !== newOverFlowItemCount) {
|
|
840
839
|
this.foundation.updateOverflowItemCount(selections.size, newOverFlowItemCount);
|
|
841
840
|
}
|
|
842
841
|
}
|
|
@@ -849,6 +848,7 @@ class Select extends BaseComponent {
|
|
|
849
848
|
className: `${prefixcls}-content-wrapper-collapse`
|
|
850
849
|
}, /*#__PURE__*/React.createElement(OverflowList, {
|
|
851
850
|
items: normalTags,
|
|
851
|
+
key: String(selections.length),
|
|
852
852
|
overflowRenderer: overflowItems => this.renderOverflow(overflowItems, length - 1),
|
|
853
853
|
onOverflow: overflowItems => this.handleOverflow(overflowItems),
|
|
854
854
|
visibleItemRenderer: (item, index) => this.renderTag(item, index)
|
package/lib/es/tree/index.js
CHANGED
|
@@ -384,7 +384,7 @@ class Tree extends BaseComponent {
|
|
|
384
384
|
if (props.value) {
|
|
385
385
|
checkedKeyValues = findKeysForValues(normalizeValue(props.value, withObject) || [], valueEntities, isMultiple);
|
|
386
386
|
} else {
|
|
387
|
-
checkedKeyValues = updateKeys(prevState.checkedKeys, keyEntities);
|
|
387
|
+
checkedKeyValues = updateKeys(props.checkRelation === 'related' ? prevState.checkedKeys : prevState.realCheckedKeys, keyEntities);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
if (checkedKeyValues) {
|
|
@@ -959,7 +959,7 @@ class TreeSelect extends BaseComponent {
|
|
|
959
959
|
if (props.value) {
|
|
960
960
|
checkedKeyValues = findKeysForValues(normalizeValue(props.value, withObject) || [], valueEntities, isMultiple);
|
|
961
961
|
} else {
|
|
962
|
-
checkedKeyValues = updateKeys(prevState.checkedKeys, keyEntities);
|
|
962
|
+
checkedKeyValues = updateKeys(props.checkRelation === 'related' ? prevState.checkedKeys : prevState.realCheckedKeys, keyEntities);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
if (checkedKeyValues) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.45.
|
|
3
|
+
"version": "2.45.1",
|
|
4
4
|
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@dnd-kit/core": "^6.0.8",
|
|
21
21
|
"@dnd-kit/sortable": "^7.0.2",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.1",
|
|
23
|
-
"@douyinfe/semi-animation": "2.45.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.45.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.45.
|
|
26
|
-
"@douyinfe/semi-icons": "2.45.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.45.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.45.
|
|
23
|
+
"@douyinfe/semi-animation": "2.45.1",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.45.1",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.45.1",
|
|
26
|
+
"@douyinfe/semi-icons": "2.45.1",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.45.1",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.45.1",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"author": "",
|
|
77
77
|
"license": "MIT",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "6ab2e8c858c718b40b6bf366e9b7c4a4992801c6",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|