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
33.53k stars 3.62k forks source link

[Feature]: Support Calbacks in the UI for Execute JS Actions #29862

Open ame-appsmith opened 8 months ago

ame-appsmith commented 8 months ago

Is there an existing issue for this?

Summary

Currently, the JS Objects tied to widgets' events such as onClick, onFilesSelected, etc., do not display Callbacks. image_720 At this jucture, the users need to handle this in the JS Object function itself or by clicking the JS icon to write custom JavaScript in the onClick event.

Why should this be worked on?

By supporting callbacks in the UI for JS object functions, users would be able to develop their apps faster, having an enhanced seamless experience.

rishabhrathod01 commented 5 months ago

@ame-appsmith For an API or Query, the success criteria is the call being successful and getting the expected response. What will be the success criteria for the success of a JS Action? Only once we have the success criteria, we would be able to support callbacks like onSuccess and onFailure to it. OR we might need to rename the callbacks to something generic so that .then and .catch support could be added to JSObject function with async keyword.