Skip to content

Commit 70a8f4a

Browse files
authored
fix(blazorui): resolve select item issues in auto mode of BitNav #10192 (#10193)
1 parent d064033 commit 70a8f4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.razor.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ internal bool GetItemExpanded(TItem item)
753753
return _itemExpandStates[item];
754754
}
755755

756-
internal async Task SetSelectedItem(TItem item)
756+
internal async Task SetSelectedItem(TItem? item)
757757
{
758758
if (item == SelectedItem && Reselectable is false) return;
759759

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

890-
_ = AssignSelectedItem(currentItem);
890+
_ = SetSelectedItem(currentItem);
891891
}
892892

893893
private void SetIsExpanded(TItem item, bool value)

0 commit comments

Comments
 (0)