2.0: dropdown allowAdditions not working correct with form set values
When using a dropdown with allowAdditions, i.e. for tags, the set values method of form wont take custom added values.
Example: http://jsfiddle.net/rduvhn8u/33/
Seems to be a problem with dropdowns set selected, independent of the form.
Example: http://jsfiddle.net/rduvhn8u/36/
Yes, set selected does not currently work with values not currently found in a dropdown's menu. This is because get item will not find a value to select.
I've spent 30 mins or so fiddling with a workaround, its not quite simple, since other methods expect get item to return false if it is not a user addition. I'll revisit this after launch in a patch release.
Since I have a hard time leaving obvious bugs open, I've decided to spend a couple hours fixing this.
There were several issues
- Remove selected did not work with arrays
- Set selected did not work when setting a user selection
- Set selected would select placeholder text when value was set to "" (empty string)
I've resolved set selected and remove selected to use a consistent API, and work with userAdditions.
This should be resolved in latest dist/ in next.