[dev-v5][AppBar] Fix OnClick not being handled in popover#4517
Merged
[dev-v5][AppBar] Fix OnClick not being handled in popover#4517
Conversation
Collaborator
vnbaaij
commented
Feb 13, 2026
- Implement PR [AppBar] Fix AppBarItem OnClick not being handeled in popover #4421 for v5
- Make the popover close after handling onclick
- use int for Count. In line with earlier CounterBadge changes
- Make the popover close after handling onclick - use int for Count. In line with CounterBadge changes
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 99.1%
|
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request ports the fix from PR #4421 to the v5 branch, addressing an issue where OnClick event handlers were not being invoked for AppBar items displayed in the overflow popover. Additionally, it aligns the Count property type with the FluentCounterBadge component by changing from ushort? to int?.
Changes:
- Fixed OnClick not being passed through to AppBarItem components in the popover
- Changed Count property type from ushort? to int? to align with FluentCounterBadge
- Made popover close after handling OnClick events
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Core/Components/AppBar/IAppBarItem.cs | Changed Count property type from ushort? to int? |
| src/Core/Components/AppBar/FluentAppBarItem.razor.cs | Changed Count property type to int? with default value; added TogglePopoverAsync call after OnClick |
| src/Core/Components/AppBar/FluentAppBar.razor.cs | Changed TogglePopoverAsync access modifier from private to internal |
| src/Core/Components/AppBar/FluentAppBar.razor | Added OnClick parameter binding for items in the popover |
| tests/Core/Components/AppBar/FluentAppBarTests.razor | Updated TestAppBarItem class to use int? for Count |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/AppBar/Examples/AppBarFromListOfApps.razor | Updated example class to use int? for Count |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/AppBar/Examples/AppBarClick.razor | Added resizable wrapper div and standardized OnClick handler reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/Demo/FluentUI.Demo.Client/Documentation/Components/AppBar/Examples/AppBarClick.razor
Outdated
Show resolved
Hide resolved
dvoituron
requested changes
Feb 13, 2026
examples/Demo/FluentUI.Demo.Client/Documentation/Components/AppBar/Examples/AppBarClick.razor
Outdated
Show resolved
Hide resolved
- Refine registration - Passthrough additional parameters
- Undo unnecessary setting Count to 0 by default
dvoituron
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.