@hw-component/table 1.9.30 → 1.9.31
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.
|
@@ -142,13 +142,10 @@ var RowSelectionBox = function RowSelectionBox(_ref5) {
|
|
|
142
142
|
};
|
|
143
143
|
var cancel = function cancel() {
|
|
144
144
|
var newKeys = _toConsumableArray(keys);
|
|
145
|
+
var newRowData = _toConsumableArray(rowData);
|
|
145
146
|
var keyIndex = _indexOfInstanceProperty(newKeys).call(newKeys, key);
|
|
146
147
|
_spliceInstanceProperty(newKeys).call(newKeys, keyIndex, 1);
|
|
147
|
-
|
|
148
|
-
var rowId = item[key];
|
|
149
|
-
var index = _indexOfInstanceProperty(newKeys).call(newKeys, rowId);
|
|
150
|
-
return index !== -1;
|
|
151
|
-
});
|
|
148
|
+
_spliceInstanceProperty(newRowData).call(newRowData, keyIndex, 1);
|
|
152
149
|
rowOnChange(newKeys, newRowData);
|
|
153
150
|
onChange === null || onChange === void 0 || onChange(newKeys, newRowData);
|
|
154
151
|
};
|
|
@@ -164,6 +161,7 @@ var RowSelectionBox = function RowSelectionBox(_ref5) {
|
|
|
164
161
|
_ref6$disabled = _ref6.disabled,
|
|
165
162
|
disabled = _ref6$disabled === void 0 ? false : _ref6$disabled;
|
|
166
163
|
var checked = _indexOfInstanceProperty(keys).call(keys, key) !== -1;
|
|
164
|
+
console.log(keys, rowData, "keys,rowData");
|
|
167
165
|
return jsx(Checkbox, {
|
|
168
166
|
checked: checked,
|
|
169
167
|
onChange: check,
|
|
@@ -143,13 +143,10 @@ var RowSelectionBox = function RowSelectionBox(_ref5) {
|
|
|
143
143
|
};
|
|
144
144
|
var cancel = function cancel() {
|
|
145
145
|
var newKeys = _toConsumableArray(keys);
|
|
146
|
+
var newRowData = _toConsumableArray(rowData);
|
|
146
147
|
var keyIndex = _indexOfInstanceProperty(newKeys).call(newKeys, key);
|
|
147
148
|
_spliceInstanceProperty(newKeys).call(newKeys, keyIndex, 1);
|
|
148
|
-
|
|
149
|
-
var rowId = item[key];
|
|
150
|
-
var index = _indexOfInstanceProperty(newKeys).call(newKeys, rowId);
|
|
151
|
-
return index !== -1;
|
|
152
|
-
});
|
|
149
|
+
_spliceInstanceProperty(newRowData).call(newRowData, keyIndex, 1);
|
|
153
150
|
rowOnChange(newKeys, newRowData);
|
|
154
151
|
onChange === null || onChange === void 0 || onChange(newKeys, newRowData);
|
|
155
152
|
};
|
|
@@ -165,6 +162,7 @@ var RowSelectionBox = function RowSelectionBox(_ref5) {
|
|
|
165
162
|
_ref6$disabled = _ref6.disabled,
|
|
166
163
|
disabled = _ref6$disabled === void 0 ? false : _ref6$disabled;
|
|
167
164
|
var checked = _indexOfInstanceProperty(keys).call(keys, key) !== -1;
|
|
165
|
+
console.log(keys, rowData, "keys,rowData");
|
|
168
166
|
return jsxRuntime.jsx(antd.Checkbox, {
|
|
169
167
|
checked: checked,
|
|
170
168
|
onChange: check,
|
package/package.json
CHANGED
|
@@ -129,13 +129,10 @@ export const RowSelectionBox = ({
|
|
|
129
129
|
}
|
|
130
130
|
const cancel=()=>{
|
|
131
131
|
const newKeys = [...keys];
|
|
132
|
+
const newRowData=[...rowData];
|
|
132
133
|
const keyIndex = newKeys.indexOf(key);
|
|
133
134
|
newKeys.splice(keyIndex, 1);
|
|
134
|
-
|
|
135
|
-
const rowId=item[key];
|
|
136
|
-
const index=newKeys.indexOf(rowId);
|
|
137
|
-
return index!==-1;
|
|
138
|
-
});
|
|
135
|
+
newRowData.splice(keyIndex,1);
|
|
139
136
|
rowOnChange(newKeys, newRowData);
|
|
140
137
|
onChange?.(newKeys, newRowData);
|
|
141
138
|
}
|
|
@@ -149,6 +146,7 @@ export const RowSelectionBox = ({
|
|
|
149
146
|
};
|
|
150
147
|
const { disabled = false } = getCheckboxProps?.(data) || {};
|
|
151
148
|
const checked=keys.indexOf(key) !== -1;
|
|
149
|
+
console.log(keys,rowData,"keys,rowData");
|
|
152
150
|
return (
|
|
153
151
|
<Checkbox
|
|
154
152
|
checked={checked}
|