[AppBar] Fix AppBarItem OnClick not being handeled in popover#4421
[AppBar] Fix AppBarItem OnClick not being handeled in popover#4421
Conversation
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 61.2%
|
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #4418 where an AppItem's OnClick event handler was not being passed through to FluentAppBarItem components when rendered in the popover. The fix adds the OnClick parameter binding in two locations where FluentAppBarItem is instantiated.
Key Changes:
- Added
OnClick="@item.OnClick"parameter toFluentAppBarItemcomponents in both the main items list and the popover overflow items
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Core/Components/AppBar/FluentAppBar.razor | Added OnClick parameter binding to FluentAppBarItem components on lines 15 and 56 to properly pass through click event handlers |
| examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml | Auto-generated XML documentation updates for MessageService (appears unrelated to the AppBar fix) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@LucaCris not sure if it should always be click and close but we can take a look on how to solve that. Please create a new issue for this as we can't do work on closed PRs and issues. |
- Make the popover close after handling onclick - use int for Count. In line with CounterBadge changes
|
After some internal discussion, we agree. Should be click and close. Will create a PR for that. |

Fix #4418. In popover, an AppItem's OnClick was not being passed through.