I am having same issue as in topic - Table not loading on table page change - #8 by arun
query is set to - "Run query only when manually triggered"
table is configure with server side pagination. Table is able to laod records on first action/event outside table. I can see pagination is showing correct results count and pagination details.
But clicking on next button does not load new records in table.
able to see pagination buttons properly but when click on next page number changes but has no effect on table data
There is no direct trigger happening when the next page button is clicked (yet)- we rely on the query populating the table to detect the input of which page to load and re-run the query when that changes
Setting the query to run automatically when inputs change is the easy way to do this, but I see you are also passing in a searchTerm here. If you go to the advanced settings tab of the query, there is a "Watched Inputs" setting under the Advanced Options section. Can you add in searchLinksTable.paginationOffset as one of the selections there? That will cause the query to run whenever that value changes, while still maintaining the other "manually triggered" behaviors.
thanks @alex-w it works when I use "resource query" rather than "Import from query library".
Seems like this is a hot topic, we're trying to accomplish close to the same thing:
- A graphql query, with results table server paginated
- Don't want to run query on pageload
- There is no search term, nothing to really "watch"
We're building an app with a container tab; each tab has one or more tables, populated by graphql (relay) queries, and server paginated. If all of the queries in the tabs run on pageload, our app will be overbearingly slow.
I have a use case where I need to trigger an api when next page button is clicked for the table. Is this feature available now?
This is possible now actually! The table event handlers now offer the "Page change" event. If you have server side pagination enabled on the table, you can have this event trigger any arbitrary behavior when the user clicks the forward or back page buttons.
So for the original scenario posted in this question- you could now directly use a manually triggered query to populate a sever side paginated table component.
Thanks for the quick response @alex-w. I don't see the INTERACTION section in table edit options somehow. Do I need to enable some option for it to show up?
What version of Retool are you running? The only reason I can think to not see an Interaction section is if you are running a version older than 2.79. Before then, this section was previously named "Events" and did not offer the Page change event option.
Is the "Page change" event still available? I can't seem to find it under the list of Interaction Event handlers.
Hey @tg295, page change handlers have been added to the new table!
Just wanted to post in case you hadn't seen it yet (or anybody else stumbles across this thread)