You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is merely a report for myself (or someone else who might feel up to fixing this one), but when dynamically creating elements using an attached #update action with the specified elements themselves containing wired actions. The wired actions will not work.
Example:
#button{id=button, text="Click me first", click=[
#update{type=insert_after, target=button, elements=[
#button{text="Click me next", click=#alert{text="You clicked the new button"}}
]}
]}.
In this, after clicking "Click me first", the "Click me next" button will be created, but clicking it will do nothing.
The problem is caused by the fact that in order to add the new elements, they need to be rendered by nitrogen, and in doing so, the attached actions get wired immediately. To fix this, the attached actions need to only be wired when the first button is clicked, with everything being enclosed in a closure.
The text was updated successfully, but these errors were encountered:
This is merely a report for myself (or someone else who might feel up to fixing this one), but when dynamically creating elements using an attached #update action with the specified elements themselves containing wired actions. The wired actions will not work.
Example:
In this, after clicking "Click me first", the "Click me next" button will be created, but clicking it will do nothing.
The problem is caused by the fact that in order to add the new elements, they need to be rendered by nitrogen, and in doing so, the attached actions get wired immediately. To fix this, the attached actions need to only be wired when the first button is clicked, with everything being enclosed in a closure.
The text was updated successfully, but these errors were encountered: