You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the column HTML element is attached to the grid before the corresponding custom element is upgraded, there is an error thrown in case this column has autoWidth property set to true due to column._allCells being undefined:
TypeError: Cannot read properties of undefined (reading 'filter')
at Grid.__setVisibleCellContentAutoWidth (chunk-IQKOLFSK.js?v=61d41aa2:4773:19)
at chunk-IQKOLFSK.js?v=61d41aa2:4813:32
at Array.forEach (<anonymous>)
at Grid.__calculateAndCacheIntrinsicWidths (chunk-IQKOLFSK.js?v=61d41aa2:4813:10)
at Grid._recalculateColumnWidths (chunk-IQKOLFSK.js?v=61d41aa2:4759:10)
at Grid.recalculateColumnWidths (chunk-IQKOLFSK.js?v=61d41aa2:4832:10)
at Grid._columnTreeChanged (chunk-IQKOLFSK.js?v=61d41aa2:5087:10)
at Object.runMethodEffect [as fn] (chunk-H7ZGI7AV.js?v=61d41aa2:2238:38)
at runEffects (chunk-H7ZGI7AV.js?v=61d41aa2:1782:16)
at Grid._propertiesChanged (chunk-H7ZGI7AV.js?v=61d41aa2:2873:7)
Expected outcome
Expected no errors. Maybe the column auto-width calculation should be triggered again once the column is defined.
Minimal reproducible example
<vaadin-grid><vaadin-grid-columnpath="surname"></vaadin-grid-column></vaadin-grid><scripttype="module">import'@vaadin/grid';constgrid=document.querySelector('vaadin-grid');grid.items=[{name: 'John',surname: 'Lennon',role: 'singer'},{name: 'Ringo',surname: 'Starr',role: 'drums'},];setTimeout(()=>{constcolumn=document.createElement('vaadin-grid-filter-column');column.setAttribute('path','name');column.autoWidth=true;grid.insertBefore(column,grid.firstElementChild);// Import the column lazily after adding to DOMimport('@vaadin/grid/vaadin-grid-filter-column.js');});</script>
Steps to reproduce
Add the snippet above to the HTML page
Open the page and check the console
Environment
Vaadin version(s): latest
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered:
Description
This is a finding from vaadin/react-components#210 (comment)
When the column HTML element is attached to the grid before the corresponding custom element is upgraded, there is an error thrown in case this column has
autoWidth
property set totrue
due tocolumn._allCells
beingundefined
:Expected outcome
Expected no errors. Maybe the column auto-width calculation should be triggered again once the column is defined.
Minimal reproducible example
Steps to reproduce
Environment
Vaadin version(s): latest
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered: