Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Quasar QTable Bottom Pagination
<q-table
:data="data"
:pagination="pagination"
@request="paginationRequest"
:columns="columns"
>
<template v-slot:top-left="props">
<TablePagination
:pagination="props.pagination"
:filter="table.filter"
@request="request"
/>
</template>
</q-table>
import Vue from 'vue'
import Bottom from 'quasar/src/components/table/table-bottom'
import Filter from 'quasar/src/components/table/table-filter'
import Pagination from 'quasar/src/components/table/table-pagination'
export default Vue.extend({
mixins: [
Bottom,
Filter,
Pagination
],
computed: {
computedRowsNumber () {
return this.pagination.rowsNumber
},
isServerSide () {
return this.computedPagination.rowsNumber !== void 0
}
},
methods: {
requestServerInteraction (prop = {}) {
this.$nextTick(() => {
this.$emit('request', {
pagination: prop.pagination || this.computedPagination,
filter: prop.filter || this.filter,
getCellValue: this.getCellValue || (() => {})
})
})
}
},
render (h) {
return h('div', [
this.getBottom(h)
])
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.