Open ame-appsmith opened 8 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.
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. 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.