Data Table Displaying Unfiltered Data Before Where Clause is Applied

Hello,

I’m currently facing an issue with the Data Table component in my application. The problem occurs when I set a where clause for the table. Specifically, before the where clause is applied, the Data Table displays all unfiltered records, even though the correct filter should be in place.

Here’s the situation in more detail:

  • I bind the where clause to the table’s filtering logic (using a variable like whereClauseCondition).
  • The table is set to become visible only once the where clause is fully defined.
  • However, despite this setup, the Data Table shows all records unfiltered before the clause is applied.

The only workaround I found was using a timer to delay the table’s visibility, but this is not an ideal solution.

My goal: I want the Data Table to remain hidden until the correct filtered data is ready, without showing any unfiltered records in the meantime.

Is there a better way to address this? Or could this behavior be considered a bug?

I appreciate your help in solving this issue.

Thank you.

Regards,
Manuel

Hi @Manuel_Germano

Hiding the table component does not prevent retrieving data, since the component is mounted even though it’s hidden.

However, if you put the table component in any other component let’s say into a Block and then hide the block all nesting components become unmounted and as a result, the table will not make a request until you specify the whereClause

As an alternative solution, you can use the OnRecordsRequest handler and control the table request/response

Regards,
Vlad

Hello @vladimir-upirov,
Problem solved!
Thank you.
Regards,
Manuel

1 Like