henrychavez / nativescript-bottom-navigation

Nativescript plugin for Android & iOS to have the bottom navigation bar of Material Design
Apache License 2.0
58 stars 18 forks source link

How to change selectTab programmatically using NativeScript Vue ? #74

Closed kelvinharleyy closed 5 years ago

kelvinharleyy commented 5 years ago

Which platform(s) does your issue occur on? Android

What type of device? Device

I'm having trouble to change selected tab index using NativeScript Vue after choose another tab. It always using default value 0. How to change it to index that i click ?

Here's my code :

 <BottomNavigationBar class="custom-bottom-navigation-bar" ref='navbot' @tabPressed="onBottomNavigationTabPressed">
                <BottomNavigationTab title="Home" icon="res://ic_home" />
                <BottomNavigationTab title="Chat" icon="~/assets/ic_chat.png" isSelectable="false"/>
                <BottomNavigationTab title="Event" icon="~/assets/event.png" isSelectable="false"/>
                <BottomNavigationTab title="Account" icon="~/assets/ic_person.png" isSelectable="false"/>
              </BottomNavigationBar>