I have a combo of records, for example user details and a switch saying whether the user wants to be private or public. Due to design requirements, the switch must be placed outside the form. (I tried to do this using absolute layouts with negative coordinates but that didn’t work; so the question is specifically about using 2+ forms bound to the same combo.)
I’m using a DataCollection for the combo’s suggest
, and I have two forms: one with the switch, and one with the user details. Both forms are bound to the combo’s list.
This snippet is self-explanatory and contains complete instructions for reproducing the unwanted behavior: the user details form doesn’t become aware of the changed value of the switch. When calling .save
, the old value will overwrite the one selected by the user.
What am I doing wrong?
Note: I know that as a workaround, I can add in the elementsConfig.click()
handler
$$('user-details-form').setValues({ [this.config.name]: this.getValue() }, true);
But the form is already bound to the DataCollection, so I don’t understand why that additional setValues()
call would be needed.