diff --git a/src/vaadin-grid-column.html b/src/vaadin-grid-column.html
index 759a9c597..00351ec7a 100644
--- a/src/vaadin-grid-column.html
+++ b/src/vaadin-grid-column.html
@@ -322,7 +322,15 @@
}
cells.forEach(cell => {
- const model = this._grid.__getRowModel(cell.parentElement);
+ const parent = cell.parentElement;
+
+ // When a column is made hidden and shown again, in some instances it breaks rendering of rows for grid
+ // this happens when parent element of cell is null, which might not be set correctly during rendering
+ // the newly shown column, this check simply avoid that case
+ if (!parent) {
+ return;
+ }
+ const model = this._grid.__getRowModel(parent);
if (renderer) {
cell._renderer = renderer;
diff --git a/test/filtering.html b/test/filtering.html
index 39ddcdec4..2d831c157 100644
--- a/test/filtering.html
+++ b/test/filtering.html
@@ -70,6 +70,15 @@
+
+
+
+
+
+
+
+
+