How to use prev Page and nextPage?
-
How to use prevPage and nextPage?
QTable API
I’m not able to trigger the method
-
@marcelo-delta would help if you produce a codepen and pls check the examples https://quasar.dev/vue-components/table#Introduction.
-
-
@marcelo-delta assign your table a ref ie.
q-table ref='mytable'
this.$refs.mytable.prevPage()
https://codepen.io/metalsadman/pen/YojRYb -
q-table ref=‘tablehistory’
methods: {
this.$refs.tablehistory.prevPage(() => {
…
})
}Does not work
-
@marcelo-delta your method definition is wrong, prevPage / nextPage doesn’t take an argument.
methods: { yourMethod() { this.$refs.tablehistory.prevPage() } }
-
How to use the prevpage and nextpage default events Qtable
-
@marcelo-delta what do you mean? other than clicking it, it does the same as invoking the methods in question. if you want to listen for event when page changes use
@update:pagination
, https://quasar.dev/vue-components/table#QTable-API -> events tab, or you could watch for changes in the pagination model that you passed on your q-table’spagination
props.