@dmlibs/dm-cmps 0.1.15 → 0.1.16
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.
|
@@ -1639,10 +1639,24 @@ class DmTable {
|
|
|
1639
1639
|
}));
|
|
1640
1640
|
}
|
|
1641
1641
|
normalizeColumns(cols) {
|
|
1642
|
-
return cols
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1642
|
+
return cols
|
|
1643
|
+
.map((col, index) => {
|
|
1644
|
+
if (col.hidden != undefined && col.hidden != null) {
|
|
1645
|
+
if (typeof col.hidden === 'boolean') {
|
|
1646
|
+
if (col.hidden)
|
|
1647
|
+
return null;
|
|
1648
|
+
}
|
|
1649
|
+
else if (typeof col.hidden === 'function') {
|
|
1650
|
+
if (col.hidden(this.datasource()))
|
|
1651
|
+
return null;
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
return {
|
|
1655
|
+
...col,
|
|
1656
|
+
id: col.id || `dm_table_col_${col.field ?? col.type}__${index}`,
|
|
1657
|
+
};
|
|
1658
|
+
})
|
|
1659
|
+
.filter((col) => col != null);
|
|
1646
1660
|
}
|
|
1647
1661
|
isSameColumnDefinition(a, b) {
|
|
1648
1662
|
return (a.field === b.field &&
|