Dynamically setting the page variable for a datatable-pager only changes the UI
See original GitHub issueSo I have this datatable-pager
<datatable-pager type="abbreviated" v-model="page" :per-page="per_page"></datatable-pager>
And the ‘page’ variable set up:
data() {
return {
page: 1,
per-page: 10
}
}
Whenever I set the ‘page’ variable to a different value from the code dynamically, like this for example:
this.page = 3;
The only thing that changes is the UI of the datatable-pager to the selected page, but the displayed data doesn’t change, it is still the data of the previous page.
Issue Analytics
- State:
- Created 5 years ago
- Comments:22 (7 by maintainers)
Top Results From Across the Web
Alternative pagination - DataTables example
There are six built-in options for which pagination controls DataTables should show: numbers - Page number buttons only; simple - 'Previous' and 'Next' ......
Read more >How to change the dropdown menu value dynamically - Help
Hi All, i have a situation like i need to change the page number of a datatable dynamically. below is the image of...
Read more >React table dynamic page size but with size limit and pagination
I am using React Table and i need to set the table rows dynamically depending on the length of my data.
Read more >How to Convert a Static HTML Table to a Dynamic JavaScript ...
Convert the HTML Table to a Data Grid to allow sorting, filtering and pagination. How to Render Data with HTML Tables. The first...
Read more >Angular Material Data Table: A Complete Example
The Angular Material Data Table - not only for Material Design ... example for implementing Detail pagination logic in a Master-Detail setup ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, I assumed you had used refs before… Give your datatable a ref i.e.
<datatable ref="myAwesomeTable" ..... > </datatable>
then call it asthis.$refs.myAwesomeTable.processRows();
Try out the v2.0.0-alpha.0 that I’ve just published. If this version does not solve your issue, please post a fiddle with a minimal repro, or we can’t help.