I have a query that makes a GET request to our API. I am using this query to get data to populate a table. The request completes successfully, and I am able to see that the data property has the expected data, but the table is not populating. What am I missing?
@janessatran
It's possible the data needs to be formatted as an Object?
Enable Transformer in the same window where your query is written and
add return formatDataAsObject(data)
Or you can try wrapping {{getStockSymbols.data}} in [ ] like [{{getStockSymbols.data}}]
Difficult to give you the right answer without seeing the actual query response...
The query response looks like an array of objects.
When I tried wrapping it in an array the page timed out, and formatting the data as an object with a transformer worked initially, but when I filter the data and remove the filters the table fails to populate again even though I see the data is there
I am filtering the table indirectly. I have a text input that has "on change" event handlers. One to add a filter based on the column "symbol" or "name", and another that clears the filters if the input field is empty. I also added an on change event handler to call the getStockSymbols query in attempt to re-populate the table, but to no avail...
OK all of those event handlers will fire based on Only run when... I suspect one of them is breaking the table or the events are firing all at once... I would test each Event handler one at a time to see where the problem exists. - I have never used that functionality before so I can't suggest if the filter itself is correct or not.. sorry
Sorry about the late reply here, are you still having this same issue? Is it particularly when clearing filters and using the Filter mode "Or"?
There's a particular issue our dev team is aware of there and should be addressed with upcoming changes to table filtering. In the meantime, you can try using table.setFilters([], 'and') as a workaround or the following event handler:
For some context, it might help if we can take a look at your query when it's failing. Would you mind posting screenshots of the query itself from the editor mode when it first fails to run? Seeing how the query is set up can really help, same with any error messages you might be seeing. It can also be helpful to check your browser console for any other error messages that might show up there.