Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6697,6 +6697,13 @@
Gets or sets a reference to the menu.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentMenuButton.UseMenuService">
<summary>
Use IMenuService to create the menu, if this service was injected.
This value must be defined before the component is rendered (you can't change it during the component lifecycle).
Default, true.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentMenuButton.Text">
<summary>
Gets or sets the texts shown on th button.
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Components/MenuButton/FluentMenuButton.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<FluentIcon Value="@(new CoreIcons.Regular.Size12.ChevronDown())" Slot="end" Color="@_iconColor" />
</FluentButton>
<FluentOverlay @bind-Visible="@_visible" Transparent="true" FullScreen="true" />
<FluentMenu @ref="Menu" Anchor="@_buttonId" aria-labelledby="button" Style="@MenuStyleValue" @bind-Open=@_visible @onmenuchange=OnMenuChangeAsync>
<FluentMenu @ref="Menu" Anchor="@_buttonId" aria-labelledby="button" Style="@MenuStyleValue" @bind-Open=@_visible @onmenuchange=OnMenuChangeAsync UseMenuService="@UseMenuService">
@foreach (KeyValuePair<string, string> item in Items)
{
<FluentMenuItem Id="@item.Key">@item.Value</FluentMenuItem>
Expand Down
8 changes: 8 additions & 0 deletions src/Core/Components/MenuButton/FluentMenuButton.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ public partial class FluentMenuButton : FluentComponentBase
[Parameter]
public FluentMenu? Menu { get; set; }

/// <summary>
/// Use IMenuService to create the menu, if this service was injected.
/// This value must be defined before the component is rendered (you can't change it during the component lifecycle).
/// Default, true.
/// </summary>
[Parameter]
public bool UseMenuService { get; set; } = true;

/// <summary>
/// Gets or sets the texts shown on th button.
/// </summary>
Expand Down
Loading