@visns-studio/visns-components 1.1.8 → 1.1.10
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.
|
@@ -592,27 +592,38 @@ const DataGrid = (props) => {
|
|
|
592
592
|
column.width && column.width > 0
|
|
593
593
|
? column.width
|
|
594
594
|
: undefined,
|
|
595
|
+
defaultWidth:
|
|
596
|
+
column.width && column.width > 0
|
|
597
|
+
? column.width
|
|
598
|
+
: undefined,
|
|
595
599
|
link: column.link ? column.link : {},
|
|
596
600
|
render: ({ data }) => {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
601
|
+
if (
|
|
602
|
+
column.placeholder &&
|
|
603
|
+
column.placeholder !== ""
|
|
604
|
+
) {
|
|
605
|
+
return <span>{column.placeholder}</span>;
|
|
606
|
+
} else {
|
|
607
|
+
let value = column.id.reduce((acc, id) => {
|
|
608
|
+
if (acc === "") {
|
|
609
|
+
return data[id];
|
|
610
|
+
} else {
|
|
611
|
+
return acc[id];
|
|
612
|
+
}
|
|
613
|
+
}, "");
|
|
614
|
+
|
|
615
|
+
if (value) {
|
|
616
|
+
if (Array.isArray(column.nameFrom)) {
|
|
617
|
+
value = column.nameFrom
|
|
618
|
+
.map((nf) => value[nf])
|
|
619
|
+
.join(" ");
|
|
620
|
+
} else {
|
|
621
|
+
value = value[column.nameFrom];
|
|
622
|
+
}
|
|
612
623
|
}
|
|
613
|
-
}
|
|
614
624
|
|
|
615
|
-
|
|
625
|
+
return <span>{value}</span>;
|
|
626
|
+
}
|
|
616
627
|
},
|
|
617
628
|
};
|
|
618
629
|
case "stage":
|
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.1.
|
|
35
|
+
"version": "1.1.10",
|
|
36
36
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
37
37
|
"main": "index.js",
|
|
38
38
|
"devDependencies": {},
|