-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGrid] - Add Loading and LoadingContent parameters #1368
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-1368.westeurope.3.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-1368.westeurope.3.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-1368.westeurope.3.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-1368.westeurope.3.azurestaticapps.net |
* [DataGrid] - Add Loading and LoadingContent parameters * Additional height work
This PR adds
Loading
(bool, default = false) andLoadingContent
(RenderFragment?) parameters to the FluentDataGrid.By default, when
Loading
is set to true, the loading content will be a progress ring with the text 'Loading...' shown besides it. You can replace that with your own content through this parameter.To change the state of the
Loading
parameter at a later stage, use theSetLoadingState(bool loading)
method on theFluentDataGrid
. To be able to call this method from your code, you need to add a@ref
to your gridThe loading content is rendered in a
FluentDataGridRow
with oneFluentDataGridCell
inside of it. The row height will be set to 100%. If no height is set for the grid this will be a normal row height. It a height is set for the grid, the row will take up all remaining height. In the example below, no height was specified for the grid.In this example te height of the grid is set to 100% of its container. Loading content takes full height (minus header height)
With this PR we are also chaging the way the EmptyContent is rendered to use the same approach (
FluentDataGridRow
with oneFluentDataGridCell
inside and following same height settings). As this is a change from earlier versions, please check your results!