Closed chibuzoro closed 6 years ago
screenshot?
rows displayed are only according to data
this.query.limit
is 5 does not mean this.data.length
is 5
you have to control this.data
to display
as seen on the screenshot i'm expecting the table data displayed to be reduced to 5 per page.. but it just stays the same.. what do i need to do to achieve the desired effect as displayed in the example
your backend API should return 5 rows according to query.limit === 5
ooh i need to do another server query for the pagination to work?
if API outputs all the rows, you have to control the display yourself. e.g.
this.data = rows.slice(this.query.offset, this.query.offset + this.query.limit)
i thought like datatables.net this is meant to be an option. that is.. once the data is pulled from the server, the table can limit its display
noop buddy... it's different
if there are 10000000000+ rows, your page stucks!
so how do i deal with page changes using this approach.. its not clear to me how to customize the behavior and positioning of the elements... going by your example. i already limit returned rows to 100 from the server.. i just want the pagination to split them as needed..
that is a front-end pagination... not a common one...
as I said, split it your self:
this.data = rows.slice(this.query.offset, this.query.offset + this.query.limit)
also: this.query.total = 100
ok
your scenario is so strange, lol
maybe id raise a new issue about how to reposition the elements.. e.g remove page-select from the footer and on to the top. also how to change the icon fonts used for sorting... looks like i have to rewrite the index of the datatable just to achive this
Thanks for the help..
you're welcome to DIY
I'm unable to get pagination working. the docs don't explain much to my understanding. I have datatables loaded as per documentation. using the advanced code example. Now footer appears to have pagination displayed and it responds to page select. However, the data on the table does not. I have 31 rows on the table, after switching page select to 5, table doesn't get limited to 5 rows.
i'm using Vue 2.5.3 vue2-datatable 2.1.18