@visns-studio/visns-components 4.10.13 → 4.10.14
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/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
76
76
|
},
|
|
77
77
|
"name": "@visns-studio/visns-components",
|
|
78
|
-
"version": "4.10.
|
|
78
|
+
"version": "4.10.14",
|
|
79
79
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
80
80
|
"main": "src/index.js",
|
|
81
81
|
"files": [
|
|
@@ -1469,13 +1469,7 @@ function Field({
|
|
|
1469
1469
|
</td>
|
|
1470
1470
|
{tableRadioColumns.map((cell, cellKey) => (
|
|
1471
1471
|
<td
|
|
1472
|
-
key={`table-radio-cell-${
|
|
1473
|
-
settings.id
|
|
1474
|
-
}-${row.id}-${
|
|
1475
|
-
cell.id
|
|
1476
|
-
}-${Math.random()
|
|
1477
|
-
.toString(36)
|
|
1478
|
-
.substr(2, 9)}`}
|
|
1472
|
+
key={`table-radio-cell-${settings.id}-${row.id}-${cell.id}`}
|
|
1479
1473
|
style={{
|
|
1480
1474
|
textAlign:
|
|
1481
1475
|
tableRadioColumns[cellKey]
|
|
@@ -247,33 +247,20 @@ const GenericDynamic = ({
|
|
|
247
247
|
return prevActiveForm;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
// Create a
|
|
250
|
+
// Create a shallow copy of rows to target only the necessary updates
|
|
251
251
|
const updatedRows = prevActiveForm[formKey].rows.map((row) => {
|
|
252
252
|
if (row.id === rowId) {
|
|
253
|
-
//
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
} else if (
|
|
258
|
-
type === 'date' ||
|
|
259
|
-
type === 'time' ||
|
|
260
|
-
type === 'text'
|
|
261
|
-
) {
|
|
262
|
-
newValue = { ...row.value, [columnId]: value };
|
|
263
|
-
} else {
|
|
264
|
-
// For other input types, use the value directly
|
|
265
|
-
newValue = { ...row.value, [columnId]: value };
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return {
|
|
269
|
-
...row,
|
|
270
|
-
value: newValue,
|
|
253
|
+
// Update only the specific cell in the target row
|
|
254
|
+
const newValue = {
|
|
255
|
+
...row.value,
|
|
256
|
+
[columnId]: type === 'checkbox' ? checked : value,
|
|
271
257
|
};
|
|
258
|
+
return { ...row, value: newValue }; // Return the updated row
|
|
272
259
|
}
|
|
273
|
-
return row;
|
|
260
|
+
return row; // Return other rows unchanged
|
|
274
261
|
});
|
|
275
262
|
|
|
276
|
-
//
|
|
263
|
+
// Update only the formKey section of activeForm
|
|
277
264
|
return {
|
|
278
265
|
...prevActiveForm,
|
|
279
266
|
[formKey]: {
|