@kmkf-fe-packages/basic-components 2.3.19-beta.7 → 2.3.19-beta.9

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/index.esm.js CHANGED
@@ -16144,30 +16144,33 @@ var GoodList = function GoodList(props, ref) {
16144
16144
  selectedRowKeys: selectIds,
16145
16145
  fixed: true,
16146
16146
  onSelect: function onSelect(record, selected) {
16147
+ var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
16147
16148
  if (selected) {
16148
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
16149
+ setSelectIds([].concat(_toConsumableArray(selectIds), [uniqueKey]));
16149
16150
  setSelect([].concat(_toConsumableArray(selectList), [record]));
16150
16151
  } else {
16151
16152
  setSelectIds(selectIds.filter(function (t) {
16152
- return t !== record.specNo;
16153
+ return t !== uniqueKey;
16153
16154
  }));
16154
16155
  setSelect(selectList.filter(function (t) {
16155
- return t.specNo !== record.specNo;
16156
+ return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
16156
16157
  }));
16157
16158
  }
16158
16159
  },
16159
16160
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
16160
16161
  if (selected) {
16161
- setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
16162
- return t.specNo;
16163
- }))));
16162
+ var changeKeys = changeRows.map(function (t) {
16163
+ return "".concat(t.goodNo, "-").concat(t.specNo);
16164
+ });
16165
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeKeys)));
16164
16166
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
16165
16167
  } else {
16166
- setSelectIds(difference(selectIds, changeRows.map(function (t) {
16167
- return t.specNo;
16168
- })));
16168
+ var _changeKeys = changeRows.map(function (t) {
16169
+ return "".concat(t.goodNo, "-").concat(t.specNo);
16170
+ });
16171
+ setSelectIds(difference(selectIds, _changeKeys));
16169
16172
  var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
16170
- return arrVal.specNo !== othVal.specNo;
16173
+ return "".concat(arrVal.goodNo, "-").concat(arrVal.specNo) !== "".concat(othVal.goodNo, "-").concat(othVal.specNo);
16171
16174
  });
16172
16175
  setSelect(list);
16173
16176
  }
@@ -16175,11 +16178,12 @@ var GoodList = function GoodList(props, ref) {
16175
16178
  };
16176
16179
  var showTable = function showTable() {
16177
16180
  var handleDelete = function handleDelete(record) {
16181
+ var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
16178
16182
  setSelectIds(selectIds.filter(function (t) {
16179
- return t !== record.specNo;
16183
+ return t !== uniqueKey;
16180
16184
  }));
16181
16185
  setSelect(selectList.filter(function (t) {
16182
- return t.specNo !== record.specNo;
16186
+ return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
16183
16187
  }));
16184
16188
  };
16185
16189
  var showColumns = [{
@@ -16203,7 +16207,9 @@ var GoodList = function GoodList(props, ref) {
16203
16207
  }
16204
16208
  }, /*#__PURE__*/React.createElement(Table, {
16205
16209
  columns: showColumns,
16206
- rowKey: 'specNo',
16210
+ rowKey: function rowKey(record) {
16211
+ return "".concat(record.goodNo, "-").concat(record.specNo);
16212
+ },
16207
16213
  dataSource: selectList,
16208
16214
  scroll: {
16209
16215
  x: '100%',
@@ -16233,7 +16239,9 @@ var GoodList = function GoodList(props, ref) {
16233
16239
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
16234
16240
  className: "GoodModalColumns",
16235
16241
  rowSelection: rowSelection,
16236
- rowKey: "specNo",
16242
+ rowKey: function rowKey(record) {
16243
+ return "".concat(record.goodNo, "-").concat(record.specNo);
16244
+ },
16237
16245
  columns: columns,
16238
16246
  scroll: {
16239
16247
  x: '100%',
package/dist/index.js CHANGED
@@ -16159,30 +16159,33 @@ var GoodList = function GoodList(props, ref) {
16159
16159
  selectedRowKeys: selectIds,
16160
16160
  fixed: true,
16161
16161
  onSelect: function onSelect(record, selected) {
16162
+ var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
16162
16163
  if (selected) {
16163
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
16164
+ setSelectIds([].concat(_toConsumableArray(selectIds), [uniqueKey]));
16164
16165
  setSelect([].concat(_toConsumableArray(selectList), [record]));
16165
16166
  } else {
16166
16167
  setSelectIds(selectIds.filter(function (t) {
16167
- return t !== record.specNo;
16168
+ return t !== uniqueKey;
16168
16169
  }));
16169
16170
  setSelect(selectList.filter(function (t) {
16170
- return t.specNo !== record.specNo;
16171
+ return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
16171
16172
  }));
16172
16173
  }
16173
16174
  },
16174
16175
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
16175
16176
  if (selected) {
16176
- setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
16177
- return t.specNo;
16178
- }))));
16177
+ var changeKeys = changeRows.map(function (t) {
16178
+ return "".concat(t.goodNo, "-").concat(t.specNo);
16179
+ });
16180
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeKeys)));
16179
16181
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
16180
16182
  } else {
16181
- setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
16182
- return t.specNo;
16183
- })));
16183
+ var _changeKeys = changeRows.map(function (t) {
16184
+ return "".concat(t.goodNo, "-").concat(t.specNo);
16185
+ });
16186
+ setSelectIds(lodash.difference(selectIds, _changeKeys));
16184
16187
  var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
16185
- return arrVal.specNo !== othVal.specNo;
16188
+ return "".concat(arrVal.goodNo, "-").concat(arrVal.specNo) !== "".concat(othVal.goodNo, "-").concat(othVal.specNo);
16186
16189
  });
16187
16190
  setSelect(list);
16188
16191
  }
@@ -16190,11 +16193,12 @@ var GoodList = function GoodList(props, ref) {
16190
16193
  };
16191
16194
  var showTable = function showTable() {
16192
16195
  var handleDelete = function handleDelete(record) {
16196
+ var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
16193
16197
  setSelectIds(selectIds.filter(function (t) {
16194
- return t !== record.specNo;
16198
+ return t !== uniqueKey;
16195
16199
  }));
16196
16200
  setSelect(selectList.filter(function (t) {
16197
- return t.specNo !== record.specNo;
16201
+ return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
16198
16202
  }));
16199
16203
  };
16200
16204
  var showColumns = [{
@@ -16218,7 +16222,9 @@ var GoodList = function GoodList(props, ref) {
16218
16222
  }
16219
16223
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
16220
16224
  columns: showColumns,
16221
- rowKey: 'specNo',
16225
+ rowKey: function rowKey(record) {
16226
+ return "".concat(record.goodNo, "-").concat(record.specNo);
16227
+ },
16222
16228
  dataSource: selectList,
16223
16229
  scroll: {
16224
16230
  x: '100%',
@@ -16248,7 +16254,9 @@ var GoodList = function GoodList(props, ref) {
16248
16254
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({
16249
16255
  className: "GoodModalColumns",
16250
16256
  rowSelection: rowSelection,
16251
- rowKey: "specNo",
16257
+ rowKey: function rowKey(record) {
16258
+ return "".concat(record.goodNo, "-").concat(record.specNo);
16259
+ },
16252
16260
  columns: columns,
16253
16261
  scroll: {
16254
16262
  x: '100%',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.3.19-beta.7",
3
+ "version": "2.3.19-beta.9",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "2.3.19-beta.7",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.3.19-beta.9",
24
24
  "ahooks": "^3.7.4",
25
25
  "ali-react-table": "2.6.1",
26
26
  "bignumber.js": "^9.1.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "d2bf1b19c15a4dee83d41bb81432be0272363539"
69
+ "gitHead": "8d8eaff9c4c2f7bde7c34c5bf913792c2091f6b6"
70
70
  }