Skip to content

Commit 47c305e

Browse files
authored
Merge pull request #5304 from fallXone/columnDefVisibility
fix(core): Apply column visibility properly. Fixes #5303
2 parents 75b4288 + c4e31bd commit 47c305e

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/js/core/services/gridClassFactory.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,14 @@
5555
return rows;
5656
});
5757

58-
grid.registerColumnsProcessor(function allColumnsVisible(columns) {
58+
grid.registerColumnsProcessor(function applyColumnVisibility(columns) {
5959
columns.forEach(function (column) {
60-
column.visible = true;
60+
column.visible = angular.isDefined(column.colDef.visible) ? column.colDef.visible : true;
6161
});
6262

6363
return columns;
6464
}, 50);
6565

66-
grid.registerColumnsProcessor(function(renderableColumns) {
67-
renderableColumns.forEach(function (column) {
68-
if (column.colDef.visible === false) {
69-
column.visible = false;
70-
}
71-
});
72-
73-
return renderableColumns;
74-
}, 50);
75-
76-
7766
grid.registerRowsProcessor(grid.searchRows, 100);
7867

7968
// Register the default row processor, it sorts rows by selected columns

0 commit comments

Comments
 (0)