Bootstrap-vue: Pagination has no click event?

Created on 29 Apr 2017  路  3Comments  路  Source: bootstrap-vue/bootstrap-vue

I tried to add v-on:click but the event never fires. How do I implement event on click?

Docs

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; } } }

All 3 comments

As quick possible solution, you can try nativemodifier: 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"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ebertti picture ebertti  路  3Comments

chris-canipe picture chris-canipe  路  3Comments

DavidRueter picture DavidRueter  路  3Comments

MikeJWms picture MikeJWms  路  3Comments

studnitz picture studnitz  路  3Comments