I have a button and alert widget. When I press the button I would like to change the alert type and description. I've create a JS query:
alert1.description = "my description";
alert1.type = "error";
This query trigger on button pressed, but the alert widget doesn't change. What am I missing here?
Thanks a lot!
All components' properties are read-only when accessing within JS, hence you can't change it in JS.
You can use Temporary State to store your data:
apply to the alert component...make sure you toggle "fx" to allow dynamic value.
Then button to trigger a JS logic to update the temporary state value.
alert.json (5.8 KB)