Regarding the Pagination component: Would it be possible to make the currentPage reset in the numberOfPages watch conditional using the following logic?
this.currentPage = (newVal >= this.currentPage ? this.currentPage : 1);
The reason being is that I have a situation in which I am using the pagination controls but I have no way of knowing what the total number of rows is in advance. So as the user goes to the next page, I am increasing the total row count based on whether or not the previous page returned a full page of results or not. So this means that when the page size is 25, total rows is set to 26 when we render page 1. When the user requests page 2, we acquire the data and set total rows to 51 if page 2 returned a full 25 rows (incrementing the total number of available pages) or set it to 50 if it did not (which keeps the total number of pages at 2). In the first situation, when data for page 3 is available the pagination control is now changing the page number back to 1 and I have no way to prevent this within code.
TLDR: I basically don't want currentPage to reset back to 1 unless the currentPage value has actually been invalidated by the change in the total number of pages (e.g. currentPage > newTotalNumberOfPages). Alternatively if we could just add a setting on the component that disables page number resetting, that would also work.
Thanks.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4