In a <b-table>
, I want to add an action button to each item:
<b-table :items="data" :fields="fields">
<template v-slot:cell(actions)="data">
<b-button v-on:click="doSomething(data.index)">Do Something</b-button>
</template>
</b-table>
Next, I have a Form located in a sidebar
<b-sidebar id="do-something-form" title="Do something" right>
...
</b-sidebar>
When the action button is clicked, I want to take a certain action in my methods:
methods: {
doSomething(id) {
sidebar.form.id = id
sidebar.show().onSubmit(() => {
axio...
refresh(<b-table>)
})
}
}
Unfortunately, this approach is not valid. I couldn't find any information in the Bootstrap Vue documentation on how to interact from Vue to Bootstrap components. Any suggestions?