BottomNavigation 上的 Nativescript 设置 selectedIndex 在 Android 上不起作用

Nativescript setting selectedIndex on BottomNavigation not working on Android

我正在尝试以编程方式设置底部导航的 selectedIndex

它适用于 iOS - 但在 Android 上没有任何反应。

const rootView = Application.getRootView();
    const bottomBar = rootView.getViewById("bottomNavigation");
console.log('bottomBar', bottomBar.selectedIndex);
    bottomBar.selectedIndex = 2;
    console.log('bottomBar-changed', bottomBar.selectedIndex);

console.log 表明 selectedIndex 实际改变了。

我尝试 rootView.requestLayout() 刷新视图,但没有用。

有什么想法吗?

Nativescript 8.x,来自插件的 BottomBar (@nativescript-community/ui-material-bottom-navigation)

似乎是 5.2.15 中的错误 - 已更新至 5.2.17,现在可以使用了。