Skip to content

Commit

Permalink
renamed DropdownItems to DropdownMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
erinnmclaughlin committed May 19, 2024
1 parent 2deca73 commit 11f53b3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<div class="d-flex justify-content-between">
<HBDropdown class="dropdown d-inline-block">
<HBDropdownTrigger class="btn btn-primary dropdown-toggle">Click Me</HBDropdownTrigger>
<HBDropdownItems class="@(context.IsOpen ? "dropdown-menu show" : "dropdown-menu")">
<HBDropdownItem class="dropdown-item">Option 1</HBDropdownItem>
<HBDropdownItem class="dropdown-item">Option 2</HBDropdownItem>
<HBDropdownItem class="dropdown-item">Option 3</HBDropdownItem>
</HBDropdownItems>
<HBDropdownMenu class="@(context.IsOpen ? "dropdown-menu show" : "dropdown-menu")">
<HBDropdownItemButton class="dropdown-item">Option 1</HBDropdownItemButton>
<HBDropdownItemButton class="dropdown-item">Option 2</HBDropdownItemButton>
<HBDropdownItemButton class="dropdown-item">Option 3</HBDropdownItemButton>
</HBDropdownMenu>
</HBDropdown>
<HBDropdown class="dropdown d-inline-block">
<HBDropdownTrigger class="btn btn-primary dropdown-toggle">Click Me</HBDropdownTrigger>
<HBDropdownItems class="@(context.IsOpen ? "dropdown-menu show" : "dropdown-menu")">
<HBDropdownItem class="dropdown-item">Option 1</HBDropdownItem>
<HBDropdownItem class="dropdown-item">Option 2</HBDropdownItem>
<HBDropdownItem class="dropdown-item">Option 3</HBDropdownItem>
</HBDropdownItems>
<HBDropdownMenu class="@(context.IsOpen ? "dropdown-menu show" : "dropdown-menu")">
<HBDropdownItemLink href="#" class="dropdown-item">Option 1</HBDropdownItemLink>
<HBDropdownItemLink href="#" class="dropdown-item">Option 2</HBDropdownItemLink>
<HBDropdownItemLink href="#" class="dropdown-item">Option 3</HBDropdownItemLink>
</HBDropdownMenu>
</HBDropdown>
</div>
4 changes: 2 additions & 2 deletions src/HeadlessBlazor.Core/HBElementBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ protected void BuildRenderTree(RenderTreeBuilder builder, ref int sequenceNumber
AddElementReference(builder, ref sequenceNumber);
}

AddChildContent(builder, ref sequenceNumber);

AddBehaviors(builder, ref sequenceNumber);

AddChildContent(builder, ref sequenceNumber);

if (createElement)
builder.CloseElement();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace HeadlessBlazor;

public class HBDropdownItems : HBElement
public class HBDropdownMenu : HBElement
{
public ElementReference ElementReference { get; private set; }

Expand Down Expand Up @@ -40,9 +40,4 @@ protected override void AddElementReference(RenderTreeBuilder builder, ref int s
await InvokeAsync(StateHasChanged);
});
}

protected override void OnParametersSet()
{
UserAttributes.TryAdd("hb-popover", "");
}
}

0 comments on commit 11f53b3

Please sign in to comment.