sccoreui 6.2.27 → 6.2.28
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.
|
@@ -244,8 +244,16 @@ const updateRecords = (rowData, featureDetails, gridData) => {
|
|
|
244
244
|
else {
|
|
245
245
|
// Update included records: add or remove the current rowData
|
|
246
246
|
newIncludedRecords = (includedRecords === null || includedRecords === void 0 ? void 0 : includedRecords.includes(rowData))
|
|
247
|
-
? includedRecords === null || includedRecords === void 0 ? void 0 : includedRecords.filter((item) =>
|
|
248
|
-
|
|
247
|
+
? includedRecords === null || includedRecords === void 0 ? void 0 : includedRecords.filter((item) => {
|
|
248
|
+
if ((item === null || item === void 0 ? void 0 : item.id) !== (rowData === null || rowData === void 0 ? void 0 : rowData.id)) {
|
|
249
|
+
return item;
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
rowData.isSelected = false; // Set isSelected to false if removing the row
|
|
253
|
+
return false; // Exclude this item from the new array
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
: [...includedRecords, rowData]; // Add rowData if it's not already included
|
|
249
257
|
// Check if all records are included; reset if so
|
|
250
258
|
if ((newIncludedRecords === null || newIncludedRecords === void 0 ? void 0 : newIncludedRecords.length) === ((_b = gridData === null || gridData === void 0 ? void 0 : gridData.rowData) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
251
259
|
return {
|
|
@@ -489,7 +489,7 @@ const FormulaComponent = (props) => {
|
|
|
489
489
|
switch (optiontype) {
|
|
490
490
|
case "INCREASE_BY_VALUE":
|
|
491
491
|
case "DECREASE_BY_VALUE": {
|
|
492
|
-
return ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ useGrouping: false, min: 0, minFractionDigits: 2, maxFractionDigits: 2 }, props === null || props === void 0 ? void 0 : props.field, {
|
|
492
|
+
return ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ useGrouping: false, min: 0, minFractionDigits: 2, maxFractionDigits: 2, maxLength: props === null || props === void 0 ? void 0 : props.maxLength }, props === null || props === void 0 ? void 0 : props.field, { onValueChange: (e) => (props === null || props === void 0 ? void 0 : props.onChange) && (props === null || props === void 0 ? void 0 : props.onChange(e)), placeholder: "Enter Number", value: props === null || props === void 0 ? void 0 : props.inputValue, className: "border-none w-6", inputClassName: "border-none focus:shadow-none" })));
|
|
493
493
|
}
|
|
494
494
|
case "INCREASE_BY_PERCENTAGE":
|
|
495
495
|
case "DECREASE_BY_PERCENTAGE": {
|