'setPage' method not working
See original GitHub issueI’m trying to make the table show the first page as default.
Code Example:
// sort table by created column
this.source.setSort([{ field: 'created', direction: 'desc' }]);
// set page 1 as default
this.source.setPage(1);
sorting works as expected but setting the page to 1 not working (table shows the last page). btw, I’m using v1.2.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
setPage(index: number) method not working #459 - GitHub
setPage(1) this function will not trigger in case of component lifecycle. Do try it for onClick event it will surely work. I was...
Read more >SetPage is not a function ERROR while trying to paginate
Your first use of CoinsPagination does not have any prop called page and setPage . import React, { useState, useEffect } from "react"; ......
Read more >[Solved]-Vue tables 2 setPage method not working after used ...
I think vue-tables.pagination event is not working properly for your code.First of all you have to create one data property which will store...
Read more >Exceptions with JEditorPane setPage() method (Catching not ...
I got serious exceptions with the JEditorPane()'s setPage() method. I have written the try & catch still i could not catch the exception....
Read more >JavaScript Pagination - setPage Method | DHTMLX Suite 7 Docs
You can explore the setPage method of Pagination in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, ......
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 FreeTop 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
Top GitHub Comments
This works for me:
setTimeout(() => this.source.setPage(10), 0);
The pagination settings seams to be overwritten, that setTimeout just set your prefered value afterward.
I had the same problem. We we using setPage like this:
this.source.load(data); this.source.setPage(2);
And it was not working. We fixed it setting page also on rowSelect, and it work like a charm.