Skip to content

Conversation

@vernou
Copy link
Member

@vernou vernou commented Jul 30, 2025

Fixes #11727

When MudTable is initialized with CurrentPage parameter, this parameter is reset at 0.

MudTable is correctly initialized with the expected CurrentPage, but next the inner MudTablePager is initialized and set MudTable.RowsPerPage what reset MudTable.CurrentPage.


The solution would be to rework the parameters RowsPerPage and CurrentPage to manage the new value in OnParameterSet, but the risk of breaking change is high. So maybe for a next major version.

The other solution (I implemented in this PR) is to not reset MudTable.CurrentPage when RowsPerPage is set for the first time.

Checklist:

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

@vernou vernou self-assigned this Jul 30, 2025
@vernou vernou added the bug Unexpected behavior or functionality not working as intended label Jul 30, 2025
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.30%. Comparing base (5af5501) to head (859d1a2).
⚠️ Report is 48 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #11745      +/-   ##
==========================================
- Coverage   91.35%   91.30%   -0.05%     
==========================================
  Files         466      466              
  Lines       14697    14711      +14     
  Branches     2853     2870      +17     
==========================================
+ Hits        13426    13432       +6     
- Misses        632      636       +4     
- Partials      639      643       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vernou vernou marked this pull request as ready for review July 31, 2025 16:52
@vernou vernou requested a review from danielchalmers July 31, 2025 16:52
@danielchalmers danielchalmers merged commit 5397f2b into MudBlazor:dev Aug 2, 2025
6 checks passed
@vernou vernou deleted the 11727-bug-datagrid-currentpage branch August 3, 2025 15:06
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.

MudTable ignores initial CurrentPage value

2 participants