@ucloud-fe/react-components 1.16.0 → 1.17.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.
|
@@ -801,6 +801,7 @@ var MultipleListSelector = /*#__PURE__*/_react.default.memo(function MultipleSel
|
|
|
801
801
|
value = props.value,
|
|
802
802
|
onChange = props.onChange,
|
|
803
803
|
placeholder = props.placeholder,
|
|
804
|
+
renderContent = props.renderContent,
|
|
804
805
|
search = props.search,
|
|
805
806
|
_props$searchValue = props.searchValue,
|
|
806
807
|
searchValue = _props$searchValue === void 0 ? '' : _props$searchValue,
|
|
@@ -825,10 +826,10 @@ var MultipleListSelector = /*#__PURE__*/_react.default.memo(function MultipleSel
|
|
|
825
826
|
(0, _newArrowCheck2.default)(this, _this14);
|
|
826
827
|
return {
|
|
827
828
|
key: v,
|
|
828
|
-
children: childrenMap.has(v) ? childrenMap.get(v) : v
|
|
829
|
+
children: childrenMap.has(v) ? renderContent ? renderContent(v) : childrenMap.get(v) : v
|
|
829
830
|
};
|
|
830
831
|
}.bind(this));
|
|
831
|
-
}.bind(this), [childrenMap, value]);
|
|
832
|
+
}.bind(this), [childrenMap, value, renderContent]);
|
|
832
833
|
var handleClose = (0, _react.useCallback)(function (key) {
|
|
833
834
|
var _this15 = this;
|
|
834
835
|
|
|
@@ -923,6 +924,7 @@ var MultipleSelector = /*#__PURE__*/_react.default.memo(function MultipleSelecto
|
|
|
923
924
|
value = props.value,
|
|
924
925
|
onChange = props.onChange,
|
|
925
926
|
placeholder = props.placeholder,
|
|
927
|
+
renderContent = props.renderContent,
|
|
926
928
|
search = props.search,
|
|
927
929
|
_props$searchValue2 = props.searchValue,
|
|
928
930
|
searchValue = _props$searchValue2 === void 0 ? '' : _props$searchValue2,
|
|
@@ -946,10 +948,10 @@ var MultipleSelector = /*#__PURE__*/_react.default.memo(function MultipleSelecto
|
|
|
946
948
|
(0, _newArrowCheck2.default)(this, _this17);
|
|
947
949
|
return {
|
|
948
950
|
key: v,
|
|
949
|
-
children: childrenMap.has(v) ? childrenMap.get(v) : v
|
|
951
|
+
children: childrenMap.has(v) ? renderContent ? renderContent(v) : childrenMap.get(v) : v
|
|
950
952
|
};
|
|
951
953
|
}.bind(this));
|
|
952
|
-
}.bind(this), [childrenMap, value]);
|
|
954
|
+
}.bind(this), [childrenMap, value, renderContent]);
|
|
953
955
|
var handleClose = (0, _react.useCallback)(function (key) {
|
|
954
956
|
var _this18 = this;
|
|
955
957
|
|
|
@@ -237,6 +237,16 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
237
237
|
|
|
238
238
|
(0, _newArrowCheck2.default)(this, _this6);
|
|
239
239
|
|
|
240
|
+
if (rowSelection.resetSelected) {
|
|
241
|
+
_this2.onSelectedRowKeysChange({});
|
|
242
|
+
|
|
243
|
+
_this2.setState({
|
|
244
|
+
indeterminateSelectedRowKeyMap: {}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
240
250
|
if (rowSelection.multiple !== false && rowSelection.linkage && flatDataSourceKeys.length) {
|
|
241
251
|
var _Object$keys$reduce = Object.keys(selectedRowKeyMap).reduce(function (p, key) {
|
|
242
252
|
(0, _newArrowCheck2.default)(this, _this7);
|
|
@@ -1665,9 +1675,15 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1665
1675
|
|
|
1666
1676
|
(0, _createClass2.default)(Table, [{
|
|
1667
1677
|
key: "initLinkageRowSelectionMap",
|
|
1668
|
-
value: function initLinkageRowSelectionMap(
|
|
1678
|
+
value: function initLinkageRowSelectionMap() {
|
|
1669
1679
|
var _this41 = this;
|
|
1670
1680
|
|
|
1681
|
+
var nowSelectedRowKeyMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1682
|
+
var checked = arguments.length > 1 ? arguments[1] : undefined;
|
|
1683
|
+
var key = arguments.length > 2 ? arguments[2] : undefined;
|
|
1684
|
+
var flatDataSourceKeys = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
1685
|
+
var indeterminateSelectedRowKeyMap = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
1686
|
+
|
|
1671
1687
|
if (!flatDataSourceKeys.length) {
|
|
1672
1688
|
return {
|
|
1673
1689
|
mergeMap: {},
|
|
@@ -1689,7 +1705,11 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1689
1705
|
}.bind(this)); // 禁用需要剔除的key
|
|
1690
1706
|
|
|
1691
1707
|
var disabledItems = this.initDisabledOfRow(flatDataSourceKeys);
|
|
1692
|
-
|
|
1708
|
+
|
|
1709
|
+
if (record) {
|
|
1710
|
+
indeterminate[String(record.key)] = false;
|
|
1711
|
+
} // 子被动全选
|
|
1712
|
+
|
|
1693
1713
|
|
|
1694
1714
|
if (record && record.childrenKeys && record.childrenKeys.length > 0) {
|
|
1695
1715
|
record.childrenKeys.forEach(function (childKey) {
|
|
@@ -1745,7 +1765,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1745
1765
|
}
|
|
1746
1766
|
}
|
|
1747
1767
|
|
|
1748
|
-
if (record.parent) {
|
|
1768
|
+
if (record && record.parent) {
|
|
1749
1769
|
changeParentChecked(record.parent, checked, disabledItems);
|
|
1750
1770
|
}
|
|
1751
1771
|
|
|
@@ -2089,7 +2109,12 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
2089
2109
|
* 需配合 columns.children 使用,控制是否开启父子联动,默认关闭
|
|
2090
2110
|
* @default false
|
|
2091
2111
|
*/
|
|
2092
|
-
linkage: _propTypes.default.bool
|
|
2112
|
+
linkage: _propTypes.default.bool,
|
|
2113
|
+
|
|
2114
|
+
/**
|
|
2115
|
+
* dataSource变更时, 是否重置选中项 ,默认为false
|
|
2116
|
+
*/
|
|
2117
|
+
resetSelected: _propTypes.default.bool
|
|
2093
2118
|
}), _propTypes.default.oneOf([true])]),
|
|
2094
2119
|
|
|
2095
2120
|
/** 拖拽排序 */
|
|
@@ -657,7 +657,7 @@ var TabBar = function TabBar(props) {
|
|
|
657
657
|
justifyContent: "space-between",
|
|
658
658
|
alignItems: "center"
|
|
659
659
|
}, /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
660
|
-
flex: 1,
|
|
660
|
+
flex: "1",
|
|
661
661
|
className: (0, _classnames8.default)((0, _defineProperty2.default)({}, "".concat(_style2.prefixCls, "-srcoll-box"), 1))
|
|
662
662
|
}, /*#__PURE__*/_react.default.createElement(ScrollableTabBarNode, props, /*#__PURE__*/_react.default.createElement(TabBarTabsNode, props), styleType === 'ink' ? /*#__PURE__*/_react.default.createElement(InkTabBarNode, props) : null)), /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
663
663
|
justifyContent: "flex-end",
|