fix: ResizeableColumns not working in FluentDataGrid
🐛 Bug Report
After updating from 4.9.0 to 4.11.7 the ResizeableColumns parameter no longer works on our FluentDataGrids.
💻 Repro or Code Sample
🤔 Expected Behavior
The column separators should render correctly, there should be no script error and the columns should be resizeable.
😯 Current Behavior
Using the ResizeableColumns in even simple tables like above does not work. It results in a javascript error, the column separators don't render correctly, nor are the columns resizeable:
[FluentDataGrid] Cannot read properties of null (reading 'addEventListener')
blazor.webassembly.js:1 TypeError: Cannot read properties of null (reading 'addEventListener')
blazor.webassembly.js:1 at https://mysite/app/_content/Microsoft.FluentUI.AspNetCore.Components/Components/DataGrid/FluentDataGrid.razor.js:239:47
blazor.webassembly.js:1 at NodeList.forEach (
💁 Possible Solution
Not sure. Haven't had a chance to dig into the source.
🔦 Context
We were in the process of upgrading the application to make use of the new ability to respond to sort events in the FluentDataGrid. This regression is preventing us from upgrading an using the newer features.
🌍 Your Environment
Windows 10, Microsoft Edge, Fluent UI Blazor 4.11.7, net8
This must be a cache issue on your side. As you can see on the demo site, resizing is working with the latest version...
As no code to reproduce is provided, we cant investigate further. Standard reply follows...
Please supply us with ready-to-run reproduction code in the form of something we can copy/paste, a (zipped) project structure or a GitHub repository.
We do not have capacity to craft or compose a reproduction for every issue that gets raised.
If no code or repository is provided, this issue will be closed in 3 days
Help us to help you. Thanks.
Apologies, I had a minimal code snippet included in the initial write up, and it somehow got lost.
Though despite my mistake you still managed to help. I was running the browser with caching enabled, but it appears the build was holding onto something. Cleaning and rebuilding appears to have fixed it.
Thanks for the direction.