LastSelectedIndex is not getting update
ssmsexe opened this issue · 2 comments
ssmsexe commented
On tab change LastSelectedIndex should be update to the previous tab but it only updates for the first time only and not the subsequent calls.
tuyen-vuduc commented
@PouyaJavadzadeh
In which use-case, do you want to use LastSelectedIndex
?
At this time, I only update it when
if (BottomTabbedRenderer.ShouldUpdateSelectedIcon && BottomTabbedRenderer.MenuItemIconSetter != null)
{
BottomTabbedRenderer.MenuItemIconSetter?.Invoke(menuItem, renderer.Element.CurrentPage.Icon, true);
if (renderer.LastSelectedIndex != pageIndex) {
var lastSelectedPage = renderer.Element.Children[renderer.LastSelectedIndex];
var lastSelectedMenuItem = menu.GetItem(renderer.LastSelectedIndex);
BottomTabbedRenderer.MenuItemIconSetter?.Invoke(lastSelectedMenuItem, lastSelectedPage.Icon, false);
renderer.LastSelectedIndex = pageIndex;
}
}
Cheers.
tuyen-vuduc commented
Latest package includes the update for LastSelectedIndex.