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

Table: Fixed incorrect async code path for label sorting #3352

Merged
merged 4 commits into from
Nov 18, 2021

Conversation

uhfath
Copy link
Contributor

@uhfath uhfath commented Nov 15, 2021

Description

This PR fixes incorrect usage of async code path when clicking MudTable labels to sort data.
Also fixed double callback for ServerData in the same case.

How Has This Been Tested?

All standard tests apply and passed.

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.

This PR was created based on 5.2.0 tag.

Fixed double server load callback when changing sorting
@codecov
Copy link

codecov bot commented Nov 15, 2021

Codecov Report

Merging #3352 (89cd080) into dev (c60d577) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #3352      +/-   ##
==========================================
+ Coverage   89.71%   89.77%   +0.05%     
==========================================
  Files         312      312              
  Lines        9507     9503       -4     
==========================================
+ Hits         8529     8531       +2     
+ Misses        978      972       -6     
Impacted Files Coverage Δ
...Blazor/Components/Table/MudTableSortLabel.razor.cs 91.17% <100.00%> (+2.28%) ⬆️
src/MudBlazor/Components/Table/TableContext.cs 98.50% <100.00%> (ø)
...c/MudBlazor/Components/ChipSet/MudChipSet.razor.cs 90.24% <0.00%> (-0.31%) ⬇️
src/MudBlazor/Components/Button/MudFab.razor 100.00% <0.00%> (ø)
src/MudBlazor/Components/Button/MudFab.razor.cs 100.00% <0.00%> (ø)
src/MudBlazor/Components/Select/MudSelect.razor.cs 95.64% <0.00%> (ø)
...r/Components/Autocomplete/MudAutocomplete.razor.cs 91.87% <0.00%> (ø)
src/MudBlazor/Components/Input/MudInput.razor.cs 85.45% <0.00%> (+3.63%) ⬆️
src/MudBlazor/Extensions/TaskExtensions.cs 55.55% <0.00%> (+16.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c60d577...89cd080. Read the comment docs.

@JonBunator JonBunator added bug Something does not work as intended/expected needs review labels Nov 15, 2021
Copy link
Member

@JonBunator JonBunator left a comment

Choose a reason for hiding this comment

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

Thanks!
Can you please also add a bUnit test?

@uhfath
Copy link
Contributor Author

uhfath commented Nov 15, 2021

Added a couple of tests to count the number of callbacks used.

@mikes-gh mikes-gh changed the title [MudTable] Fixed incorrect async code path for label sorting Table: Fixed incorrect async code path for label sorting Nov 15, 2021
uhfath and others added 2 commits November 18, 2021 09:01
…rSideDataTest5.razor

Co-authored-by: Jonas B. <62108893+JonBunator@users.noreply.github.com>
Co-authored-by: Jonas B. <62108893+JonBunator@users.noreply.github.com>
Copy link
Member

@JonBunator JonBunator left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks

@JonBunator JonBunator added this to the 6.0.3 milestone Nov 18, 2021
@JonBunator JonBunator merged commit 36548fb into MudBlazor:dev Nov 18, 2021
@uhfath
Copy link
Contributor Author

uhfath commented Nov 18, 2021

@JonBunator just out of curiosity, could you please comment on the Context thing?
It's just that I see a lot of pieces of code where Context is assumed to be null but don't know in which case that's possible.

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.

2 participants