@lemon-fe/kits 1.0.5-3 → 1.0.5-4
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.
|
@@ -559,16 +559,19 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
559
559
|
_createClass(DataGrid, [{
|
|
560
560
|
key: "setField",
|
|
561
561
|
value: function setField(field) {
|
|
562
|
+
var newFields = _toConsumableArray(this.fields);
|
|
563
|
+
|
|
562
564
|
var idx = this.fields.findIndex(function (item) {
|
|
563
565
|
return item.id === field.id;
|
|
564
566
|
});
|
|
565
567
|
|
|
566
568
|
if (idx >= 0) {
|
|
567
|
-
|
|
569
|
+
newFields[idx] = field;
|
|
568
570
|
} else {
|
|
569
|
-
|
|
571
|
+
newFields.push(field);
|
|
570
572
|
}
|
|
571
573
|
|
|
574
|
+
this.fields = newFields;
|
|
572
575
|
this.updateColumnDefs(this.columnApi.getColumnState());
|
|
573
576
|
}
|
|
574
577
|
}, {
|
|
@@ -1293,6 +1296,14 @@ var DataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1293
1296
|
|
|
1294
1297
|
return null;
|
|
1295
1298
|
};
|
|
1299
|
+
|
|
1300
|
+
fieldCol.valueFormatter = function (params) {
|
|
1301
|
+
if (Number.isNaN(params.value) || BigNumber.isBigNumber(params.value) && params.value.isNaN()) {
|
|
1302
|
+
return '-';
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
return params.value;
|
|
1306
|
+
};
|
|
1296
1307
|
}
|
|
1297
1308
|
|
|
1298
1309
|
result.push(fieldCol);
|
|
@@ -592,7 +592,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
592
592
|
|
|
593
593
|
var newResults = results;
|
|
594
594
|
newData.splice(data.findIndex(function (item) {
|
|
595
|
-
return _this4.getRowKey(item);
|
|
595
|
+
return _this4.getRowKey(item) === node.id;
|
|
596
596
|
}), 1);
|
|
597
597
|
|
|
598
598
|
if (results.has(key)) {
|