appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.67k stars 3.75k forks source link

[Feature]: Whenever code bound to a widget data field is run, it should take the widget into a loading state. #28849

Open satbir121 opened 1 year ago

satbir121 commented 1 year ago

Is there an existing issue for this?

Summary

Currently, if an Api or a Query is bound to a widget's data field, and the API/Query is run, the widget is taken into loading state. The Widgets do not go into a loading state when a JS Object function is bound to the data field.

Expected behaviour is for the Widgets to go into a loading state when:

  1. Any JS object function bound to a data field is executing.
  2. Any code written inside the data field property is executing.

Why should this be worked on?

We should work on this to maintain consistency in the loading behaviour when a API, Query and JS object function is bound to a data field.

codenameakshay commented 9 months ago

Same use case, need to animate loading in the table when the data is being fetched from the TestDetails.onSelectEval() method.

image

codenameakshay commented 9 months ago

This also doesn't works with charts. This is a major issue, as users don't understand when data is loading, and hence they think that there is an error, as chart shows No chart to display message instead of empty or showing any loader.

image
avjaintwilio commented 1 month ago

I have the same issue with the table not going into loading mode when a JS object is called to populate the data. It makes it look like the table is already loaded, when the table has old data from the previous input. This is confusing for the user as it shows the stale data in the table without giving the user a signal for new data loading.

rishabhrathod01 commented 1 month ago

@rahulbarwal We could also note this issue down when we plan to fix the widget loading related issues.