Skip to content

Commit

Permalink
don't focus on dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
erinnmclaughlin committed May 18, 2024
1 parent e789ad3 commit 6f93783
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/HeadlessBlazor.Dropdown/HBDropdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace HeadlessBlazor;

public class HBDropdown : HBElement<HBDropdown>, ICloseable
{
public ElementReference ElementReference { get; set; }
public ElementReference ElementReference { get; private set; }
public bool IsOpen { get; private set; }

[Parameter]
Expand All @@ -25,15 +25,6 @@ protected override void OnAfterInitialized()
OnClickItem = new EventCallback<HBDropdownItem>(this, CloseAsync);
}

protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await ElementReference.FocusAsync();
StateHasChanged();
}
}

protected override void BuildRenderTree(RenderTreeBuilder builder)
{
var seq = 0;
Expand Down

0 comments on commit 6f93783

Please sign in to comment.