Data not visible on component with valid JS single line code
@arpitnath is already working on this.
Since Jul 2, 2024.
- Dominant language
- JavaScript
- Stars
- 40.9k
- Forks
- 5.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 202
Description
Issue Title:
Data not visible on component with valid JS single line code
Description:
When using valid JS single-line code to set data in a component, the data should be displayed correctly without requiring any additional operations. However, the data is not appearing as expected. This issue is observed in both the Table and Listview components.
Version Information: EE LTS-2.50.9.8
Environment:
ToolJet Cloud / Docker / Linux / MacOS
Expected Behaviour:
On all valid JS single-line code, the data should be visible on the component without performing any other operations.
Current Behaviour:
The data is not visible if we are using different js functions are using to get the data dynamically with the help of variables/exposed values
Steps to Reproduce:
Case 1: Table
- Add a table and populate it with some data.
- Add a row click event to set a variable with the
selectedRowId. - Populate the default value of the text input with a value from the row identified by
selectedRowIdusing the following code:{{((queries.restapi1.data ?? []).find(obj => obj.id === variables.selectedRowId)?.category ?? "")}}
Case 2: Listview
- Add a Listview component inside a tab.
- Set a variable from a query (the variable should be nested).
- Use the exposed value of a radio button to fetch the data for the Listview dynamically using the following code:
{{variables.appState.spreadsheet[components.radiobutton1.value] || []}}
Screenshots or Screencast
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.