Category: JS Objects
Resource links
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

No Data Display On List When First Deployed

Issue

I am having an issue with my table and list widgets on my app. When I select a row in the table, the corresponding data in the list below does not initially display. It only displays after selecting a different row and then returning to the first row. The list gets populated by a query that runs in the onRowSelected event of the Table widget. Although the query runs fine without reloading, it does not return any data initially on page load. The queries depend on each other, and I need to chain them in order to make the app work properly.

Resolution

To handle this scenario you should define a function to run on page load. In the function you can await the queries in the order needed to successfully initialize the data needed for the page. You can view our guide for [running code on page load](https://docs.appsmith.com/write-code/concepts/execute-onpageload) to learn more.