vaadin / vaadin-grid

vaadin-grid is a free, high quality data grid / data table Web Component. Part of the Vaadin components.
https://vaadin.com/components
Apache License 2.0
399 stars 155 forks source link

fix: correctly show rows after showing hidden column and clearing grid filter #2200

Closed hdamr closed 2 years ago

hdamr commented 2 years ago

Description

When grid is used with an in-memory data provider with more than 50 items, after applying a filter and hiding a column and respectively making the column visible and filter cleared (in this particular order), grid breaks and it won't show items correctly unless page is refreshed.

The current fix simply resolves by checking for cell parent not being null in __setColumnTemplateOrRenderer method, and by doing so the issue is resolved. I have added a relevant test case which tests this particular behaviour.

This PR is rebased on top of master (which includes all changes made into running tests)

Fixes https://github.com/vaadin/flow-components/issues/2330

Type of change

Checklist

Additional for Feature type of change