-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MudTablePager: Add thousands separator for all_items #11371
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
MudTablePager: Add thousands separator for all_items #11371
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #11371 +/- ##
==========================================
- Coverage 91.11% 91.11% -0.01%
==========================================
Files 465 465
Lines 14402 14402
Branches 2785 2785
==========================================
- Hits 13123 13122 -1
Misses 643 643
- Partials 636 637 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a thousands separator for the "all_items" value in MudTablePager to improve number readability.
- Updated the string interpolation for the all_items value in the Info property.
- Adjusted the Localizer call to use the formatted number with a thousands separator.
Comments suppressed due to low confidence (1)
src/MudBlazor/Components/Table/MudTablePager.razor.cs:125
- The thousands separator implementation appears correct, but it's only visually tested. Consider adding unit tests to verify the formatting behavior across different culture settings.
.Replace("{all_items}", $"{filteredItemsCount:N0}");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. An invariant test might help
Description
Added thousands separator for all_items of MudTablePager
How Has This Been Tested?
It has only been tested visually.
Type of Changes
Example
Note: the string interpolation
$"{filteredItemsCount:N0}"
usesCultureInfo.CurrentCulture
by default.In this environment, the culture is set to
it-IT
(Italian), so the thousands separator is a dot (.
).For example, 88088 will be formatted as 88.088.
The output may vary depending on the culture settings of the environment where the application is running.
Before

After

Checklist
dev
).