From a02b697858c92eb62940d44a39865538523889b9 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Thu, 6 Mar 2025 19:02:03 +0330 Subject: [PATCH] fix select item issues in auto mode of BitNav #10192 --- src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.razor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.razor.cs index 0b255eee97..d0f18bf0ed 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.razor.cs @@ -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; @@ -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)