Users want to create a behaviour to dynamically set some options to a radio button (using setFieldOptions) and set the radio button to visible or hidden (using setHidden). setHidden method does not working when running both methods together in the same code block.
Create a behavior with 2 fields, 1 radio button, and 1 single list field. Use the example code from the library here
Using the switch statement, run the setHidden method together with setFieldOptions method in the same code block.
For this testing, I run setHidden(true) and setFieldOptions(options) in 'default case'.
- When the value does not match with any case in the switch statement, the field will be hidden
- When the value does not match with any case in the switch statement, the field is still visible
- I print the log using isHidden() method, it shows the correct value but UI does not reflect the changes
- Reference: Bug_Behavior_SetHiddenAndSetFieldOptions.mov