Is there a way to connect navbar's dropDown to nav...
# kvision
b
Is there a way to connect navbar's dropDown to navigo router?
r
Just use links in dropdown
like in the showcase example:
Copy code
dropDown(
                        tr("Favourites"),
                        listOf(tr("HTML") to "#!/basic", tr("Forms") to "#!/forms"),
                        icon = "fas fa-star",
                        forNavbar = true
                    )
or do you want something else?
b
Kinda yes, however when I click on dropdown itself to reveal options it goes to
#
first, which messes up my state.
So if there's a way to disable that behaviour I can work with it.
r
I'll check this out
It's fixed
2.9.0 is building
❤️ 1
b
One more thing, what event can i hook to to listen for TabPanel tab changes?
r
I'm not sure there is such event currently
What would you like to get?
just a notification about the change?
b
Yes, that would suffice
Essentially i need to update my state depending on tabPanel active tab
r
Copy code
tabPanel() {
                    addTab(tr("HTML"), BasicTab(), "fas fa-bars", route = "/basic")
                    addTab(tr("Forms"), FormTab(), "fas fa-edit", route = "/forms")
                    addTab(tr("Buttons"), ButtonsTab(), "far fa-check-square", route = "/buttons")
                }.onEvent {
                    tabChange = { e ->
                        console.log("Active index: ${e.detail.data}")
                    }
                }
The event will be dispatched both by click and by routing.
b
Ah, didn't see that event available. Awesome
r
It wasn't. I've added it in 2.9.0.