Bob Perry
Bob Perry

Reputation: 59

Vuetify Navigation Drawer - bind selected item to to Vue v-model

I am looking to bind the navigation drawer to the v-model in vue/vuetify.

I was able to do this easily using the radio group (v-radio-group - see below)

v-radio-group v-model="selectedList" :mandatory="false"

But would prefer to use the navigation drawer for visual reasons. Is there a way to bind in similar way or another solution? Thanks you.

Upvotes: 1

Views: 1262

Answers (1)

Bob Perry
Bob Perry

Reputation: 59

I found an answer in an example for the v-stepper. On each level of the navigation drawer -just add below to click event and I get what I needed. SelectedItem is variable in vue data and item.icon is the value that was originally put in each navigation drawer.

@click="selectedItem = item.icon"

thanks to all for weighing in.

Upvotes: 1

Related Questions