ToolJet / ToolJet

Low-code platform for building business applications. Connect to databases, cloud storages, GraphQL, API endpoints, Airtable, Google sheets, OpenAI, etc and build apps using drag and drop application builder. Built using JavaScript/TypeScript. 🚀
https://tooljet.com
GNU Affero General Public License v3.0
33.12k stars 4.29k forks source link

Bug : Control Component is not working for list view component #4060

Open manishkushare opened 2 years ago

manishkushare commented 2 years ago

Environment

Development

What is the expected behaviour?

We should be able to control the children's's components in the List view widget as parent Component using CSA (Component specific actions)

What is the current behaviour?

We cannot control the component using CSA when the components are placed inside the list view widget.

How to reproduce the issue?

  1. Create a new application or open an existing one
  2. Drag the list view widget from the right sidebar on the canvas.
  3. You can observe by default, that the list view contains 3 children components - Image, Text, and Button widget
  4. We will try to control the text widget by clicking on the button widget.
  5. For performing step 4, let's click on the Button widget or click on the label of the button widget, inside the list view component to open the Button widget inspector. A widget inspector for Button will appear on the right sidebar.
  6. Look for the Events menu, and create a new event, if no events are present, click on +add handler to add a new event handler or use an existing one.
  7. Click on the available event handler button, and an event manager pop-up will appear.
  8. Look for the Action field in the pop-up, open the respective dropdown, and select control component as a value
  9. Two more new fields will appear below the Action field.
  10. In the Component field, select any widget, for our better understanding, let's select text1 ( Text widget )
  11. In the Action field under Action Option, select setText (setText is an action available for the Text widget)
  12. In the Text field, give any input, with which you desire to change the text inside Text Widget on the canvas.
  13. Now, we have set to control the Text component using the onClick event on the Button Component
  14. Click anywhere outside the event manager pop-up to close it.
  15. Now, click on the Button, and after clicking it, the text inside Text Input should change accordingly. This behavior is not what we desire.

Now to Understand how the Control component actually works, you can play with the Text and Button widget by dragging them on the canvas, and performing steps 5 to 13. But, don't place them inside any component, rather drag just two of them on the canvas and experiment it, How the control component works.

Screenshots or Screencast

Tooljet - Dashboard - 19 September 2022 - Watch Video

AyushK-101 commented 2 years ago

I would like to work on this

Nandinisaha13 commented 1 year ago

CSA also not working inside form.

https://user-images.githubusercontent.com/41302917/219559424-4932de24-9f31-4cc8-a334-862c56c7016a.mov