Server side pagination issue

I have created a folder named Inventory, inside it created a module which is Header and two apps; show inventory and create inventory and used the module inside those two apps as a navbar to switch between the apps, then moved to sow inventory app dragged and droped a table which is table 1 and enabled server side pagination from the adds on and everything thing is fine. Then created a query to show data in the table which isselect * from inventory order by id limit {{table1.pagination.pageSize}} offset {{table1.pagination.offset}};
But the query doesn't run and got table 1 is out of scope of the editor, what is the reason and how to solve?

I tried to recreate your configuration with some demo data and your query works fine.

Four things I would try:

  • Reload the page and see if the query will run
  • Ensure your query is defined on the same page as the table, otherwise the table will definitely be out of scope
  • Ensure Page Size value is for server-side pagination
  • Run the query without the pagination statements to load some data into state. It was a little finicky enabling server-side pagination and it gave me an error until I ran the query, enabled server-side pagination in the table options, then uncommented the limit and offset statements and ran the query again
2 Likes

Thanks a lot, the issue was that the query was in global not page scope and now it works

1 Like