fix: Toggle Event Effect Chooser Data Typing#3008
Conversation
- Loading a dropdown-select element with no values loaded to bind to it locked it into string-handling mode. - This broke the Toggle Event effect on initial creation, which expected object-handling mode, but supplied no initial binding values. - Added an optional one-way "value-mode" attrib to dropdown-select to force it to operate in either object or string mode, or default to prior behavior when unspecified. - See crowbartools#3006
|
It looks like the other locations where a similar issue could have potentially been reached all have other means of preventing it from occurring. Either length checking, hard-coded choices, or no potential way to initialize the control in an empty manner, then later show it. That makes me re-question the approach I took here, but this PR does keep the UX identical while avoiding the issue. It also allows other places to be able to change the value mode in their template should they desire to, so I'm keeping it. Let me know if you'd prefer changing the UX of this one effect instead of the added attribute, or if you've got a better idea to deal with this. |
ebiggz
left a comment
There was a problem hiding this comment.
Thanks for this fix - getting into the weeds with angularjs' archaic attribute data binding is never a fun time so I empathize.
Description of the Change
Applicable Issues
#3006
Testing
Tested Toggle Event creation and editing thoroughly, plus a handful of others. I still need to verify whether a similar issue could occur in approximately 4 other places, at which point I'll just tack them on to here sometime tonight.
Screenshots
Newly-created effect before:
Newly-created effect after: