IMO calling setValue on select should deselect all the earlier selected values.
The current problem it occured: in the ModelProvider I showed on IRC first sets the default value. When I repopulate the form, the selected value does not override the default one.
I also think that it should be possible to determine whether an Option is selected or not. IMO this would be better on this line:
$attributes['selected'] = 'selected';
This also makes it super easy to deselect an item.
IMO calling setValue on select should deselect all the earlier selected values.
The current problem it occured: in the ModelProvider I showed on IRC first sets the default value. When I repopulate the form, the selected value does not override the default one.
I also think that it should be possible to determine whether an Option is selected or not. IMO this would be better on this line:
This also makes it super easy to deselect an item.