Closed
Description
After updating to v3.0.7, one of my columns (which makes use of custom headerCellTemplate
and cellTemplate
in the column definition) is no longer being rendered (the column shows up blank and there is no HTML for it).
The column is initially pinned to the left (pinnedLeft: true
in column definition) and I use it as a custom selection column (one that I can control the filtering/behavior of). The templates are based on the default templates with minor differences.
The related change is #4428 (see issue #4386). Particularly here:
Before
// If we either have some columns defined, or some data defined
if (self.grid.options.columnDefs.length > 0 || newData.length > 0) {
// Build the column set, then pre-compile the column cell templates
promises.push(self.grid.buildColumns()
.then(function() {
self.grid.preCompileCellTemplates();
}));
}
After
// If we haven't built columns before and either have some columns defined or some data defined
if (!hasColumns && (self.grid.options.columnDefs.length > 0 || newData.length > 0)) {
// Build the column set, then pre-compile the column cell templates
promises.push(self.grid.buildColumns()
.then(function() {
self.grid.preCompileCellTemplates();
}));
}
If I remove !hasColumns
from the if statement, my column renders again. Is the logic being implemented wrong? I don't understand enough about what @oriondean was trying to do here.
Metadata
Metadata
Assignees
Labels
No labels