Vue.js - Select / dropdown selected item vm binding is not working (bootstrap-vue)
b-dropdown
in bootstrap-vue
does not support v-model
. As the documentation states:
Dropdowns are toggleable, contextual overlays for displaying lists of links and actions in a dropdown menu format.
In other words, b-dropdown
is essentially a UI component for displaying a menu or similar set of options.
I expect what you want is b-form-select
.
That said, you could add a click handler to the options that sets the value.
<b-dropdown-item v-for="option in ddTestVm.options"
:key="option.value"
:value="option.value"
@click="ddTestVm.ddTestSelectedOption = option.value">
Here is a working example.