Skip to content
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] Respecting control state of Loading parameter #3064

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

adamint
Copy link
Member

@adamint adamint commented Dec 18, 2024

Pull Request

πŸ“– Description

🎫 Issues

Fixes #2998

πŸ‘©β€πŸ’» Reviewer Notes

This PR changes FluentDataGrid.Loading to a nullable boolean. If the value is not-null, the grid is considered controlled and requires the user to change loading state themselves. If the value is null, the grid will manage loading state itself - if Items are provided, Loading is set to false, otherwise Loading is true until the ItemsProvider has returned data.

This also fixes the issue where initially EmptyContent is rendered if there is an ItemsProvider when the grid should be rendering LoadingContent.

As a smoke test, you can look at the "Remote Data" section on the DataGrid demo example page, which now shows a loading page before content is loaded.

πŸ“‘ Test Plan

I've added a basic DataGrid test as well as several tests surrounding Loading, with either ItemsProvider or Items.

βœ… Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

@vnbaaij vnbaaij changed the title Fix DataGrid not respecting control state of Loading parameter [DataGrid] Respecting control state of Loading parameter Dec 19, 2024
@vnbaaij vnbaaij merged commit 5d92bcf into microsoft:dev Dec 19, 2024
4 checks passed
@vnbaaij vnbaaij added this to the v4.11 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: Loading value is now ignored in DataGrid when there is an item provider
2 participants