Strange Behavior: Table Change Page Event Unexpectedly Triggered by Text Input Changes

Dear Retool Support Team,

I'm experiencing a strange and unexpected behavior in my Retool application and would appreciate your assistance in resolving this issue.

Issue Description: After submitting a text input once, subsequent changes to the input field are triggering the table's change page event handler, even though there's no direct connection between the input and the table besides the query.

Setup:

  1. Query:
WITH filtered_space_companies AS (
  SELECT id, name, createdAt
  FROM `_space_company` sc
  WHERE {{ space_dashboard_table_search_filter?.value ? "sc.name LIKE '%" + space_dashboard_table_search_filter?.value + "%'" : "1=1" }}
)
SELECT
  fsc.id,
  fsc.name
FROM
  filtered_space_companies fsc
LIMIT
  {{ space_dashboard_table?.pagination?.pageSize }}
OFFSET
  {{ space_dashboard_table?.pagination?.offset }}
  1. Query run behavior: Manual
  2. Text input: Has a query trigger on submit
  3. Table pagination: Server-side
  4. Table change page event handler:
  • Triggers the query
  • Sets a variable to Math.random() for testing purposes

Observed Behavior:

  1. Initially, changing the input does not trigger the table's change page event handler.
  2. After submitting the input once, any subsequent change to the input triggers the table's change page event handler.
  3. The variables set in the change page event handler are also changing with each input change.

Expected Behavior: The table's change page event handler should only trigger when changing the table's page, not when modifying the text input.

Questions:

  1. Why is the table's change page event being triggered by input changes after the first submission?
  2. Is there a hidden connection being established between the input and table after the first query run?
  3. How can I prevent this strange behavior and ensure the table's event handler only responds to actual page changes?

Any insights or suggestions on how to resolve this issue would be greatly appreciated. Please let me know if you need any additional information or clarification.

Thank you for your time and assistance.

Hi @dev2, welcome to the forum! :wave:

  • Is there only one event handler for page change?
  • Are there any event handlers on the text input we are using to filter?

Please share a screenshot of your table and text input settings.