@hw-component/table 0.0.5-beta-v8 → 0.0.5-beta-v9
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.
|
@@ -26,7 +26,7 @@ var RowSelectionTitle = function RowSelectionTitle(_ref) {
|
|
|
26
26
|
_ref2$records = _ref2.records,
|
|
27
27
|
records = _ref2$records === void 0 ? [] : _ref2$records;
|
|
28
28
|
var newData = records === null || records === void 0 ? void 0 : _filterInstanceProperty(records).call(records, function (item) {
|
|
29
|
-
var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(
|
|
29
|
+
var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(item)) || {},
|
|
30
30
|
_ref3$disabled = _ref3.disabled,
|
|
31
31
|
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled;
|
|
32
32
|
return !disabled;
|
|
@@ -27,7 +27,7 @@ var RowSelectionTitle = function RowSelectionTitle(_ref) {
|
|
|
27
27
|
_ref2$records = _ref2.records,
|
|
28
28
|
records = _ref2$records === void 0 ? [] : _ref2$records;
|
|
29
29
|
var newData = records === null || records === void 0 ? void 0 : _filterInstanceProperty(records).call(records, function (item) {
|
|
30
|
-
var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(
|
|
30
|
+
var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(item)) || {},
|
|
31
31
|
_ref3$disabled = _ref3.disabled,
|
|
32
32
|
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled;
|
|
33
33
|
return !disabled;
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ export const RowSelectionTitle = ({
|
|
|
16
16
|
} = useHTableContext();
|
|
17
17
|
const { records = [] } = data || {};
|
|
18
18
|
const newData = records?.filter((item) => {
|
|
19
|
-
const { disabled = false } = getCheckboxProps?.(
|
|
19
|
+
const { disabled = false } = getCheckboxProps?.(item) || {};
|
|
20
20
|
return !disabled;
|
|
21
21
|
});
|
|
22
22
|
const { keys, selectAll } = selectedRowData;
|
|
@@ -36,7 +36,13 @@ export default () => {
|
|
|
36
36
|
configData={configData}
|
|
37
37
|
rowKey={"id"}
|
|
38
38
|
table={hTable}
|
|
39
|
-
rowSelection={{
|
|
39
|
+
rowSelection={{
|
|
40
|
+
getCheckboxProps:(item)=>{
|
|
41
|
+
return {
|
|
42
|
+
disabled:item.id===2
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}}
|
|
40
46
|
affixProps={{
|
|
41
47
|
target: () => document.querySelector(".body"),
|
|
42
48
|
}}
|