Bind from combo to form doesn't work

Hi All,
Does anyone help me to understand why bind from combo to form in this code doesn’t work ?

Code

Using Datatable, works fine.

Hello @ngchagas,

The combo (like any other component) can only produce one value. In your example, there is no text field value for displaying value, which combo gave. So this makes appear that the bind is not happening. However, if we add a field with the value “value”, we will see that the bind occurs: Code Snippet

For example, from a list / DataCollection / datatable the form will receive { area: "IT", impact: "high", solved: "yes" }.
But if a component can give only one value (as a combo), then for the form it is always converted to an object of the form { value: /* component's value */ }.

Since any component can only return its value, and not something internal, we can suggest passing data through the DataCollection. Create DataCollection, so that the options for combos are taken from the collection. And the form will be bound to the collection and receive all available data. Also in the onChange event a cursor is placed in the collection

Please, check out the snippet with the example: Code Snippet

That’s exactly what I need. Thanks Natasha.

1 Like