is there any way to change b-pagination in bootstrap-vue programmatically like this:
this.$refs.pagination.goToPage(3) // This is just example
or using the pagination plugin like this:
this.$bvPagination.goToPage('pagination', 3) // This is just example too
I'm trying to find the documentation of the bootstrap-vue pagination plugin but I didn't found it yet. I was thought that has something like $bvPagination as there is $bvModal in modal plugin.
Using v-model didn't work for me, the page was still in page 1.
<b-pagination
v-model="pagination.currentPage"
:total-rows="pagination.totalItems"
first-number
last-number
:per-page="pagination.selectedAmount"
/>
in mounted method :
mounted() {
this.pagination.currentPage = this.$store.state.app.lastPage
}
in watch :
watch: {
'pagination.currentPage': function (page) {
this.$store.commit('app/UPDATE_LAST_PAGE', page)
},
},