Category: On Prem
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.

JS running inconsistently on page load

Issue

I am trying to use a JavaScript function to retrieve user data on page load, but it does not consistently run. We tried putting the data into appsmith.store instead and referencing it from there, but we still need to manually call the query. The ProgressLoading widget does not work as expected and does not become visible. We are self-hosted and not sure if we accidentally changed something.

Resolution

The issue was with a JavaScript function that was intended to run on page load but was not consistent. The user was using Appsmith's store to reference the user data, but the query was not automatically called, so it needed to be manually called using the JavaScript function. However, the issue was not with the JavaScript function but with the ProgressLoading widget that was not becoming visible. The solution was to use storeValue() to assign a value to the widget property rather than directly assigning a value to it using ProgressLoading.isVisible = true/false. The user was provided with a link to Appsmith's documentation on configuring widget properties.