@aloudata/aloudata-design 2.7.5 → 2.7.6
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.
|
@@ -56,28 +56,20 @@ export default function useRowSelection(props) {
|
|
|
56
56
|
changeSelectedRowKeys([]);
|
|
57
57
|
}, [changeSelectedRowKeys]);
|
|
58
58
|
var onClickAllCheckbox = useCallback(function () {
|
|
59
|
-
if (rowSelection !== null && rowSelection !== void 0 && rowSelection.selectedRowKeys) {
|
|
60
|
-
// 受控情况
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
59
|
if (checkboxAllStatus === 'all') {
|
|
64
60
|
unSelectAll();
|
|
65
61
|
} else {
|
|
66
62
|
selectAll();
|
|
67
63
|
}
|
|
68
|
-
}, [checkboxAllStatus, unSelectAll, selectAll
|
|
64
|
+
}, [checkboxAllStatus, unSelectAll, selectAll]);
|
|
69
65
|
var onClickCheckbox = useCallback(function (key, isChecked) {
|
|
70
66
|
return function () {
|
|
71
|
-
if (rowSelection !== null && rowSelection !== void 0 && rowSelection.selectedRowKeys) {
|
|
72
|
-
// 受控情况
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
67
|
var newKeys = isChecked ? selectedRowKeys.filter(function (keyItem) {
|
|
76
68
|
return keyItem !== key;
|
|
77
69
|
}) : [].concat(_toConsumableArray(selectedRowKeys), [key]);
|
|
78
70
|
changeSelectedRowKeys(newKeys);
|
|
79
71
|
};
|
|
80
|
-
}, [selectedRowKeys,
|
|
72
|
+
}, [selectedRowKeys, changeSelectedRowKeys]);
|
|
81
73
|
|
|
82
74
|
// 全选按钮
|
|
83
75
|
var getCheckboxAllNode = function getCheckboxAllNode(children) {
|