I tried to add v-on:click but the event never fires. How do I implement event on click?
As quick possible solution, you can try native
modifier: v-on:click.native=""
to catch native click event, not pagination's own
As quick workaround, I made use of the custom input event that's being emitted like so:
<b-pagination v-on:input="myClickedEventhandler" :total-rows="50" v-model="currentPage" :per-page="10"</b-pagination>
It's best to mention it in the documentation and perhaps not a bug?
Here's the part of the pagination component code that led me to this workaround.
watch: {
currentPage(newPage) {
this.$emit('input', newPage); // custom input event emitted
},
value(newValue, oldValue) {
if (newValue !== oldValue) {
this.currentPage = newValue;
}
}
}
It does have a click event.
@page-click="handleClick"
Most helpful comment
As quick workaround, I made use of the custom input event that's being emitted like so:
<b-pagination v-on:input="myClickedEventhandler" :total-rows="50" v-model="currentPage" :per-page="10"</b-pagination>
It's best to mention it in the documentation and perhaps not a bug?
Here's the part of the pagination component code that led me to this workaround.
watch: { currentPage(newPage) { this.$emit('input', newPage); // custom input event emitted }, value(newValue, oldValue) { if (newValue !== oldValue) { this.currentPage = newValue; } } }