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
- [Vuejs]-Why can I not push data to new object after filtering it with forEach?
- [Vuejs]-How can I prevent randomly positioned divs from overlapping on small/mobile screens? when elements are created in created() hook
Source:stackexchange.com