Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MudTabPanel: Add missing BadgeMax#13119

Merged
danielchalmers merged 4 commits into
MudBlazor:devfrom
SnakyBeaky:fix/tabs-badge-max
Jun 2, 2026
Merged

MudTabPanel: Add missing BadgeMax#13119
danielchalmers merged 4 commits into
MudBlazor:devfrom
SnakyBeaky:fix/tabs-badge-max

Conversation

@SnakyBeaky

Copy link
Copy Markdown
Contributor

MudTabPanel uses a MudBadge internally, but doesn't allow the user to provide a Max for the badge, only allows BadgeData, BadgeIcon, BadgeDot and BadgeColor to be specified.

This change adds a BadgeMax property that allows integer BadgeData values above the default badge max of 99 to be displayed using a custom maximum instead of always rendering as 99+.

Checklist:

  • I've read the contribution guidelines
  • My code follows the style of this project
  • I've added or updated relevant unit tests

@SnakyBeaky SnakyBeaky requested a review from versile2 as a code owner April 24, 2026 13:25
@mudbot mudbot Bot added API change Modifies the public API surface in a non-breaking way (ex: adds a new property) enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library labels Apr 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a BadgeMax parameter to MudTabPanel so tab badges can display integer BadgeData values above the default 99 threshold using a configurable maximum.

Changes:

  • Add BadgeMax [Parameter] to MudTabPanel (default 99).
  • Pass BadgeMax through to the internal MudBadge via its Max parameter.
  • Add unit tests covering integer badge overflow behavior with different max values, and update the docs example.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/MudBlazor/Components/Tabs/MudTabs.razor Forwards MudTabPanel.BadgeMax to MudBadge.Max during tab header rendering.
src/MudBlazor/Components/Tabs/MudTabPanel.razor.cs Introduces the new BadgeMax parameter (default 99) with XML docs.
src/MudBlazor.UnitTests/Components/TabsTests.cs Adds test cases verifying "99+" vs exact integer display depending on BadgeMax.
src/MudBlazor.Docs/Pages/Components/Tabs/Examples/TabsWithBagdesExample.razor Updates a docs example to show configuring the max for large badge values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/MudBlazor.Docs/Pages/Components/Tabs/Examples/TabsWithBagdesExample.razor Outdated
@danielchalmers

Copy link
Copy Markdown
Member

Thank you!

@danielchalmers danielchalmers merged commit b04d0e9 into MudBlazor:dev Jun 2, 2026
11 checks passed
This was referenced Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API change Modifies the public API surface in a non-breaking way (ex: adds a new property) enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants