Target changed? #116
-
Hi Renaud i used to be able to set a component as target of a button’s click event. All components names were displayed in a dropdown of the target attribute. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, indeed. Now, in order to be accessible as a target component, the component MUST have an explicit name. You have to give an explicit name by clicking on the edit button on the right side of the component's name (upper-right panel). To conform with explicit names, the component's name must not end with a dash and a number (otherwise it is considered as an implicit name). There are exceptions: dialogs and connectors don't need to be explicitly name to be accessible. Example:
This new way of doing things is meant to encourage naming components that are accessed by other components (for readability). Most components should use the Note that all components still have a name (but not always accessible/visible) and that your apps should not break with the new version (it is backward compatible). However, you should rename the components at some point to get going. When you need to rename a component and all references, first checkout the implicit name by clicking on the name's edit button (it will show a popup with the old name), then do a search in the component tree to find all the references to that name (you can also rename directly the app's JSON file in your favorite editor, which can be more efficient). |
Beta Was this translation helpful? Give feedback.
-
Thanks. Got it! |
Beta Was this translation helpful? Give feedback.
Yes, indeed. Now, in order to be accessible as a target component, the component MUST have an explicit name. You have to give an explicit name by clicking on the edit button on the right side of the component's name (upper-right panel). To conform with explicit names, the component's name must not end with a dash and a number (otherwise it is considered as an implicit name). There are exceptions: dialogs and connectors don't need to be explicitly name to be accessible.
Example:
button-3
: implicit name (will not appear nor be accessible in code completion)my-custom-button
: explicit name (will appear)This new way of doing things is meant to encourage naming components that are accessed …