I would like to limit the number of items displayed at one time (using collapsibleContainers inside the listView), to try to improve loading time. As currently listView doesn't have a built in option to paginate, does anyone have any ideas how to do this?
Currently I will have around 35 items in one listView and would like to paginate at 10 items. In the future this might be 70-100 items in total.
Thanks nmz,
That's a nice idea. I will experiment with a segmentedControl above the listView.
Using SQL query the total number of records and add an appropriate number of options to that segmentedControl, and then in turn pass the value selected back to another query to control what's displayed.
Should work.
LIMIT 5 OFFSET (1 - 1) * 5; -- will be the first page
LIMIT 5 OFFSET (2 - 1) * 5; -- will be the second page
LIMIT 5 OFFSET (3 - 1) * 5: -- will be the third page, and so on
I hope I'm on the right track. Otherwise, feel free to correct me!
Here's a sample app with List View pagination! It currently references my data, but just replace the resource with your own resource and the table name with your own table name and it should work
You can import this JSON file by clicking Create new (home page) > From JSON. Quick docs on exporting/importing apps here.