But even with a reload, on saved settings, the sorting is not happening when applying saved settings.
I am using a non-virtualized data set. Is there a specific time i need to call Reload other than in the Load Async method above, which is where I'm calling it now after the saved settings are applied? Maybe that's my issue, but can't find another spot to call reload or to get the grid sorted.
I tried reload as the article suggested - i really haven't tried anything else because this appeared to be the solution. LoadStateAsync is called from after render async on the first reload also following the guidance in the article. thank you!
private async Task LoadStateAsync()
var result = await JSRuntime.InvokeAsync<string>("window.localStorage.getItem", GridName);
// we should also plan for some bad data here -- right now it's happy path
Settings = JsonSerializer.Deserialize<DataGridSettings>(result);
I should add that, if we take the base example and add the line in bold ... sorting appears to work. That is some good news. However, when I add a filter, "SettingsChanged" gets called twice -- once with the filter value, once with null, so the filter is not really applied.
Thoughts or suggestions on this trial or alternate ideas?
@awolf -- there are some similarities ... but i did just find the following tidbit ...
I was using an OnFilter event -- this way i can call my api with the actual filter and not just have it filtered in the grid. when I remove this handler, the settings overrides losing filters "goes away".
I need to use that event .. so i will continue exploring options.