`<b-pagination>` Should not go to the first page when page numbers change
See original GitHub issueI found the code in paginator.js
watch: { numberOfPages(newVal) { if (newVal === this.localNumPages) { /* istanbul ignore next */ return } this.localNumPages = newVal this.currentPage = 1 } },
Why you change currentPage to 1 when the numberOfPages is changed ?
Our use case is: delete all of data in current page, then I go to last page and fetch data again. The currentPage should keep the same as value model.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Start page numbering later in your document - Microsoft Support
Remove the page number from the first page · Go to Insert > Header or Footer > Edit Header or Edit Footer. ·...
Read more >How to Start Page Numbering From 1 on a Different Page in ...
Start Page Numbers Within Document To simply skip numbering on the first page, click the "Insert" tab in the ribbon menu, then click...
Read more >How to Number All Pages Except First in Word 2019 - YouTube
In today's video, you will learn how to number all pages except first in Word 2019.Open the document you want to work with....
Read more >How to start page numbers after the first few pages in a Word ...
Removing pages numbers from a few but not all pages in a Microsoft Word can be difficult if you don't know about section...
Read more >Word Tips: Modifying Page Numbers in Word - GCF Global
From there, you'll be able to select Start at: 1. To reformat your numbering, select the page number, then go back to the...
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
I was able to fix it, my problem was that I loaded the elements to paginate using ajax.
So when my content loaded, it would trigger a pagination pagesCount change, and then it will move the pointer to the first page. (which was my problem and the subject of this thread).
So to solve it I added a “v-if” condition on the paginator to only load it when the content to paginate is already there.
One problem with this is that even when you keep your internal data structure on the correct page, the display of the pagination switches to page 1. What we were doing is to “deny” the page change (by using the @change event only and ignoring the @input event), but even though the data for the correct page was shown, the pagination displayed page 1. The only workaround I could find was to change the page to page 1 and on the next tick, change it back to the previous page so that b-pagination would reevaluate and show the correct page again.
Is there maybe a better way around this?
Edit: I think an option to control this behavior would be best, i.e. some way to deactivate the automatic page change.