Open LucaMahler opened 5 days ago
handle events whenever the GridState has changed (sorting, filtering, etc.)
I guess it's related https://github.com/MudBlazor/MudBlazor/issues/6433 https://github.com/MudBlazor/MudBlazor/issues/6583
handle events whenever the GridState has changed (sorting, filtering, etc.)
I guess it's related #6433 #6583
I think it's related, although it'd be nice if it's comprehensive, i.e. the entire state.
But it doesn't seem as if something is progressing on this front... Is really no one interested in this?
But it doesn't seem as if something is progressing on this front... Is really no one interested in this?
There was a PR, but it was a breaking change that we didn't allow at that time. Additionally, we had some questions about why certain things were done that way, but the author of the PR has never replied. So, no, nobody is working on or interested in implementing that.
Feature request type
Enhance component
Component name
MudDataGrid
Is your feature request related to a problem?
We use Fluxor for the Flux/Redux UI state management. This entails that the data flow is unidirectional.
Instead of DataGrid's ServerData function expecting a fixed list as a result, we'd want to handle events whenever the GridState has changed (sorting, filtering, etc.), through which an load action would be dispatched. In the background, the data is being loaded and then a loaded action is being dispatched. This in turn would save the list in the State. And this list must be the data source for the DataGrid.
Currently this seems to be absolutely impossible, since with DataGrid.Items, we cannot hook into the GridState events, and with ServerData we cannot use Flux. We even tried to await within the ServerLoad function until the background stuff is being done, (with TaskCompletionSource), but it doesn't seem to work. And event if we could figure it out, it is very ugly.
Is there an approach to allow for Flux to work with MudBlazor, especially DataGrid?
Describe the solution you'd like
Add an event handler for GridState, e.g.:
<MudDataGrid GridStateChanged="..." Items="State.Value.ListItems">
Have you seen this feature anywhere else?
No response
Describe alternatives you've considered
No response
Pull Request
Code of Conduct