Posted 16 May 2024, 1:46 am EST
Hello, I have a React FlexGrid that uses cell templates to display extra stuff in the data cells. I have noticed that the grid doesn’t calculate the correct row height until the taller cells become visible.
Here is an example that I created that shows the issue. It has a large image in the first cell of the grid.
https://stackblitz.com/edit/react-lcsifs?file=index.js,data.js
To reproduce the issue, do the following:
- When the grid first loads, the images are visible and all the rows are tall.
- Scroll all the way to the right so that you can no longer see the images.
- Apply a filter to the last column. This causes the grid to refresh.
a. After applying the filter and refreshing, the row heights are now only as tall as the visible text. - Scroll all the way back to the left so the image becomes visible.
a. When the image becomes visible, the row height changes to accommodate the image height.
My requirement is to force the rows to be the correct height as soon as they load, rather than waiting for the user to scroll the rest of the row content into view. Please note that I cannot set a specific row height because I do not know the exact sizes of the various cell content.