Query triggered twice when using table pagination

We are experiencing an issue where a query is triggered twice when using table pagination to pass the page number and page size to the query. The query is set to run automatically, and the problem occurs when the totalRowCount field is updated during pagination. This redundant triggering results in unnecessary network calls and affects performance.

Steps to Reproduce:

  1. Set up a table component with server-side pagination enabled.
  2. Configure the query to accept pageNumber and pageSize as inputs.
  3. Set the query to run automatically.
  4. Configure the table’s pagination totalRowCount field to update dynamically based on the totalRecords received in the query response.
  5. Launch the app, observe that the query is triggered twice in succession when the totalRowCount is updated.
2 Likes

I don't have much experience with Retool, but if I have dynamic totalRowCount, then I would make my request with manual trigger. To me, it seems expected that Retool does that.

Hey @Mustafa_Saify! Welcome back to the community. :slightly_smiling_face:

I've done some initial testing and am unable to replicate this particular issue. Even when configured to run automatically, your query shouldn't re-trigger unless it references totalRowCount. Are you able to share a JSON export of your app so that I can more easily see how everything is configured?