I'd like to see a "go to first page: <<" and "goto last page: >>" option for navigating pages of a table. Also, I'd like to see the page number as a dropdown that the user can choose a page from, rather than only being able to type the number?
Thank you.
Hey @jclutterbuck! Great points. Just filed. In the meantime, as a workaround, you can use some components to control the table's page. Check out this app (Create new (app) > Import from JSON) and let me know if you have any questions at all!
First page: button that runs an event handler to control the table and select page 0
Last page: button that runs an event handler to control the table and select page {{Math.ceil(table1.data.length/table1.pageSize) - 1}}
Dropdown: select component that runs an event handler to control the table and select page {{select1.value}}
A couple notes about the dropdown:
- I populated the dropdown with an array of numbers starting from 0 going to the last page
{{ _.range(Math.ceil(table1.data.length/table1.pageSize)) }}
- I edited the dropdown labels to be "user friendly" (most users associate 1 as the first page, not 0) by adding 1 to the value by setting the Label field to
{{item + 1}}
go-20to-20first-20and-20last-20page-20of-20table.json
This is a great idea! Thanks.
Also, when navigating pages in tables, if you navigate to a later page, then apply a filter, if there are insufficient pages of data you see NO data and the page number displays something like Page 2 of 1. You then have to go back a page (and even if you are many pages from page 1, it jumps automatically to page 1!). I think the expected behaviour of applying a filter would be to adjust the page to the last page of results if the current page number becomes greater than the number of resulting pages?
1 Like
Definitely a bug! Thank you for the detailed repro. Linked the bug report to this thread as well!