Open weisborg opened 7 years ago
The if (option.prop('selected')) probably also needs something that also compares the option text to the existing text of the combobox input to select it as well. I'm not sure how it would work or which would override the other though.
This piece didn't impact me much since I use Mustache to set a data-value in the select and after updating the select I then set the value of the select before calling refresh on the combo. To me, since refresh is building off the select it should get all details from the select, but if we add any other functionality I've been seeing requested like allowing values not in the list and such it would be needed.
There isn't anything currently when calling refresh(which calls parse) to clear the current selection if the new options don't have a selected option or the value that was there isn't in the list anymore.
It needs something like this at the end: