[Vuejs]-Vue bootstrap table: button in column not rendering

2👍

I’m not sure which version of bootstrap-vue you’re using, but if you’re on version 2.23.0, then you can use slots for adding buttons and other HTML elements, see below example of info model button in documentation:

https://bootstrap-vue.org/docs/components/table#complete-example

1👍

You can achieve this by using slot in the template itself for that particular column.

<b-table :items="items" :fields="fields">
    <template v-slot:cell(<component.name>)="{ item }">
      <span><b-btn @click="showModal(item)">Launch Demo Modal</b-btn></span>
    </template>
</b-table>

You can see cell({key}) slot here

Leave a comment