FluentDataGrid column widths wrong initially #4043
-
Hi, I am having an issue with the data grid component, where when my page loads the column widths seems to be wrong/ignored until I move the mouse cursor over the page, when the column widths then seem to update and become correct. Please see the code below, which is based off the virtualized grid demo example. Can anyone see what I am doing wrong, or what I have to do to avoid this problem? Thanks. P.S. I'm using InteractiveServer, Google Chrome and Fluent UI 4.12.1.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Okay, I finally figured it out. It's a bit of a weird one. When the page loads there is no "table-layout: fixed" style attribute on the table (as seen using the browser console), however when I move the cursor over the page one is getting added, which is why the column widths appear to change. Simply adding "table-layout: fixed" myself to the style attribute of the table fixes the problem. |
Beta Was this translation helpful? Give feedback.
Okay, I finally figured it out. It's a bit of a weird one. When the page loads there is no "table-layout: fixed" style attribute on the table (as seen using the browser console), however when I move the cursor over the page one is getting added, which is why the column widths appear to change. Simply adding "table-layout: fixed" myself to the style attribute of the table fixes the problem.