Skip to content

Conversation

@Blocko07
Copy link
Contributor

@Blocko07 Blocko07 commented Sep 13, 2025

Trigger StateHasChanged on MudCarousel.AddItem to render the bullets correctly

Resolves #11798

Checklist

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

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a UI bug where carousel bullets were not updating upon adding a new item. The change correctly moves StateHasChanged() to be called unconditionally, ensuring the component re-renders. However, the submission lacks a unit test to cover this bug fix. The project's style guide mandates that all logic changes must be accompanied by tests. Adding a test would prevent future regressions of this issue.

Copy link
Contributor

@versile2 versile2 left a comment

Choose a reason for hiding this comment

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

Code is simple and sound.
Verified the unit test fails before the code change and passes after.
Visually verified Viewer WASM and Docs BSS to ensure no oddities or artifacts.

@danielchalmers
Copy link
Member

Thank you!

@danielchalmers danielchalmers merged commit 8544871 into MudBlazor:dev Sep 18, 2025
6 checks passed
@Blocko07 Blocko07 deleted the fix/mud-carousel-add-item-bullet branch September 18, 2025 16:08
@danielchalmers danielchalmers added bug Unexpected behavior or functionality not working as intended design labels Sep 19, 2025
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.

The bullets displayed don't always match the number of items in the carousel when using ItemSource

3 participants