@visns-studio/visns-components 1.0.21 → 1.0.23

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.
@@ -459,6 +459,19 @@ const DataGrid = (props) => {
459
459
  return <span>{icons}</span>;
460
460
  },
461
461
  };
462
+ case "json":
463
+ return {
464
+ name: column.id,
465
+ header: column.label,
466
+ defaultFlex: 1,
467
+ link: column.link ? column.link : {},
468
+ render: ({ data }) => {
469
+ if (data) {
470
+ data = data[column.id][column.jsoncolumnData];
471
+ }
472
+ return <span>{data}</span>;
473
+ },
474
+ };
462
475
  case "number":
463
476
  return {
464
477
  name: column.id,
@@ -513,13 +526,9 @@ const DataGrid = (props) => {
513
526
 
514
527
  if (value) {
515
528
  if (Array.isArray(column.nameFrom)) {
516
- let tempValue = "";
517
-
518
- column.nameFrom.forEach((nf) => {
519
- tempValue += value[nf] + " ";
520
- });
521
-
522
- value = tempValue;
529
+ value = column.nameFrom
530
+ .map((nf) => value[nf])
531
+ .join(" ");
523
532
  } else {
524
533
  value = value[column.nameFrom];
525
534
  }
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "react-dom": ">=18.2.0"
33
33
  },
34
34
  "name": "@visns-studio/visns-components",
35
- "version": "1.0.21",
35
+ "version": "1.0.23",
36
36
  "description": "Various packages to assist in the development of our Custom Applications.",
37
37
  "main": "index.js",
38
38
  "devDependencies": {},