Skip to content

[Bug]: Sync function .data shows up as empty object {} in widgets #29978

Open
@satbir121

Description

Is there an existing issue for this?

  • I have searched the existing issues

Description

When I bind .data property of a sync function to a Text Widget, it show {} inside the text. It should show the actual return value of the function.

Steps To Reproduce

  1. Create a JS Object
  2. Return Math.random() from myFun1 inside the JS object and do not run the function.
  3. Bind JSObject1.myFun1.data to a Text1 Widget.
  4. Create another Text2 widget and bind JsObject1.myFun1() to the new Text2 widget.
  5. Observe that Text2 will have the proper value of myFun1 while Text1 will just show {} . Also observe that even though the function was run because of the binding inside Text2, the value did not change in Text1.

Public Sample App

No response

Environment

Production

Issue video log

https://theappsmith.slack.com/archives/C02K0SZQ7V3/p1702626183189739?thread_ts=1702617425.866509&cid=C02K0SZQ7V3

Version

Cloud

Metadata

Labels

BugSomething isn't workingJS ObjectsIssues related to JS ObjectsJavascript ProductIssues related to users writing javascript in appsmithMediumIssues that frustrate users due to poor UXNeeds TriagingNeeds attention from maintainers to triageProductionQuery & JS PodIssues related to the query & JS Pod

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions