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

MudDatagrid: Fix grouping to work with filtered items cache. #6557

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

adameste
Copy link
Contributor

Description

Fix datagrid grouping breaked by previous PR #6495.
GroupDefinitions were initialized with previous lazy-evaluated linq query and thus updated with every render.
With cache they get a list, which stays the same and groups don't update properly.
Fixed it by updating groupings after new items cache is created, added parameter to not update component state - that would cause infinite rendering loop.
Maybe a better solution involving more work is possible (pass function to GroupDefinition? possibly slower). This should work just fine.

How Has This Been Tested?

  • Existing unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Something does not work as intended/expected PR: needs review labels Mar 30, 2023
@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (465f37b) 91.46% compared to head (3bff07e) 91.47%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6557   +/-   ##
=======================================
  Coverage   91.46%   91.47%           
=======================================
  Files         393      393           
  Lines       14876    14877    +1     
=======================================
+ Hits        13607    13608    +1     
  Misses       1269     1269           
Impacted Files Coverage Δ
...MudBlazor/Components/DataGrid/MudDataGrid.razor.cs 88.36% <100.00%> (+0.02%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@henon
Copy link
Collaborator

henon commented Mar 30, 2023

@ScarletKuro FYI

@henon henon merged commit 2631eef into MudBlazor:dev Mar 30, 2023
@henon
Copy link
Collaborator

henon commented Mar 30, 2023

@adameste Thank you very much for the quick fix.

ScarletKuro pushed a commit to ScarletKuro/MudBlazor that referenced this pull request Apr 4, 2023
ilovepilav pushed a commit to ilovepilav/MudBlazor that referenced this pull request Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants