Skip to content

fix: The OnClick event in FluentMenuItem does not function when it is an item within a FluentMenuButton. #2780

@aminmashayekhi

Description

@aminmashayekhi

🐛 Bug Report

When FluentMenuItem is nested within FluentMenuButton, its OnClick event is not triggered.

💻 Repro or Code Sample

<FluentMenuButton ButtonAppearance="Appearance.Stealth" Text="File" >
    <FluentMenuItem Id="itmAccCodeList" OnClick="@((e) => itmAccCodeList_Click(e))" >AccCode List</FluentMenuItem>
</FluentMenuButton>

@code {
    private void itmAccCodeList_Click(MouseEventArgs e)
    {
        // Do somthing like:
        Console.WriteLine("Worked!");
    }
}

🤔 Expected Behavior

The itmAccCodeList_Click event is triggered when a FluentMenuItem is clicked.

😯 Current Behavior

No action occurred when it is a child of FluentMenuButton.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions