Skip to content

MudDataGrid: Fix no records found appearance with Virtualize#10552

Merged
ScarletKuro merged 3 commits intoMudBlazor:devfrom
Ptipoi-jf:fix/datagrid-no-records-found-appearance
Jan 15, 2025
Merged

MudDataGrid: Fix no records found appearance with Virtualize#10552
ScarletKuro merged 3 commits intoMudBlazor:devfrom
Ptipoi-jf:fix/datagrid-no-records-found-appearance

Conversation

@Ptipoi-jf
Copy link
Contributor

@Ptipoi-jf Ptipoi-jf commented Jan 3, 2025

Description

Fix #10524

How Has This Been Tested?

unit | visually
new test : DataGridNoRecordsContentVirtualizeTest.razor
new viewer test : DataGridVirtualizeServerDataLoadingWithSearchGroupableTest.razor

Type 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)
  • Documentation (fix or improvement to the website or code docs)

Checklist

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

Additionnal note :

DataGridVirtualizeServerDataLoadingWithSearchGroupableTest.razor show grouping problem with Virtualize flag and didn't work - i says didn't work at all with Virtualize -

grouping must be done with the full data set and virtualization must do not refer to the same VirtualItemsProvider i guess because it reset actual grouping (set _currentRenderFilteredItemsCache to null)
BTW it didn't work on V7

cache cancellation

when i'm looking for the grouping problem i see that specific case : virtualize component can cancel the current chunk and then return empty result => which clear the grouping (because no data)

                //do not reset cache, the current chunk load has been cancelled, we wait for the final load
                if (!request.CancellationToken.IsCancellationRequested)
                {
                    _currentRenderFilteredItemsCache = null;
                }

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Jan 3, 2025
@codecov
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.56%. Comparing base (f7f07fe) to head (9bf8829).
Report is 15 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #10552   +/-   ##
=======================================
  Coverage   91.55%   91.56%           
=======================================
  Files         426      426           
  Lines       13305    13309    +4     
  Branches     2565     2565           
=======================================
+ Hits        12182    12186    +4     
  Misses        548      548           
  Partials      575      575           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ScarletKuro
Copy link
Member

@danielchalmers do you think moving:

<tr class="mud-table-row">
<td class="mud-table-cell" colspan="1000">
      No data
</td>
</tr>

to the DataGrid itself is a correct a decision?

Copy link
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielchalmers do you think moving:

<tr class="mud-table-row">
<td class="mud-table-cell" colspan="1000">
      No data
</td>
</tr>

to the DataGrid itself is a correct a decision?

Sure, that pattern is already used several times in MudDataGrid.razor.

@sonarqubecloud
Copy link

@ScarletKuro ScarletKuro merged commit 17a42de into MudBlazor:dev Jan 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudDataGrid: NoRecordsFound appearance

3 participants