Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix select item issues in auto mode of BitNav (#10192) #10193

Merged
Merged
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
4 changes: 2 additions & 2 deletions src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ internal bool GetItemExpanded(TItem item)
return _itemExpandStates[item];
}

internal async Task SetSelectedItem(TItem item)
internal async Task SetSelectedItem(TItem? item)
{
if (item == SelectedItem && Reselectable is false) return;

Expand Down Expand Up @@ -887,7 +887,7 @@ private void SetSelectedItemByCurrentUrl()
var currentItem = Flatten(_items).FirstOrDefault(item => GetUrl(item) == currentUrl
|| (GetAdditionalUrls(item)?.Contains(currentUrl) ?? false));

_ = AssignSelectedItem(currentItem);
_ = SetSelectedItem(currentItem);
}

private void SetIsExpanded(TItem item, bool value)
Expand Down
Loading