blazorbootstrap icon indicating copy to clipboard operation
blazorbootstrap copied to clipboard

Grid settings provider breakpoint never hit

Open tippers424 opened this issue 5 months ago • 2 comments

I have a grid which should preserve settings as per the documentation but it's not. The settings I set a breakpoint on the following line but it is never hit.

var settingsJson = await JS.InvokeAsync<string>("window.localStorage.getItem", "grid-settings");

My grid has the SettingsProvider and GridSettingsChanged parameters set as per the docs.

Any ideas what might prevent this please?

tippers424 avatar Aug 28 '25 09:08 tippers424

It's to do with a DateInput that is on the same page and linked to the grid.

I want to refresh the grid data when the date is changed. I've tried using @bind-Value and ValueChanged (not together) and while they refresh the grid data, the grid settings aren't applied. If I remove the @bind-Value/ValueChanged from the DateInput, the grid settings are applied but the grid data doesn't refresh.

How can I have both?

tippers424 avatar Aug 28 '25 15:08 tippers424

A workaround is to replace the DateInput component with a basic input and bind it to the property.

<input id="txtDate" type="date" required @bind-value="WorkDate" />

Works fine then both with grid settings and data refreshing, just a shame the two Bootstrap Blazor components don't play nice together!

tippers424 avatar Aug 29 '25 08:08 tippers424