appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]: JS functions do not execute when set to run on page load

Open ramsaptami opened this issue 3 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

Setting a JS functions to run on page load should execute and display on the respective widget but this does not happen

Steps To Reproduce

  1. Execute an API like Api1.run on JS object and return data like Api1.data from the function myFunc
  2. Bind JSObj.myFunc.data to a table widget and observe the message that the JS function will be run on page load
  3. Refresh the page and observe table data being empty but the Api has been run successfully

Public Sample App

No response

Version

Cloud

ramsaptami avatar Aug 08 '22 12:08 ramsaptami

@ramsaptami Could you please provide code snippets for these?

nidhi-nair avatar Aug 09 '22 12:08 nidhi-nair

JS object that's been set to run on page load and also is bound to the table widgets on the canvas where no data is displayed when page is refreshed

ramsaptami avatar Aug 09 '22 12:08 ramsaptami

Are we supposed to be allowed to connect async functions to table data? @ramsaptami

nidhi-nair avatar Aug 09 '22 13:08 nidhi-nair

I'd assume this is a use case since we allow accessing function data so displaying transformed data from a function onto a table should be allowed?

ramsaptami avatar Aug 09 '22 13:08 ramsaptami

@ramsaptami Is this issue still happening?

satbir121 avatar Aug 18 '22 10:08 satbir121

Closing this since it's working as expected

ramsaptami avatar Aug 22 '22 13:08 ramsaptami