Angularjs compatible #49
@PsyStorm25 thank you very much for your contribution. unfortunately i still have issues using your patched file. using the angular directive ng-repeat together with ng-model to create select options an empty select option is always displayed. |
Hello webermax, I think this is an expected behavior from angularjs and it is not dependent on dropdown.js
Once an option is selected and so ng-model set, the empty option should disappear. If you are talking about a different issue, please provide more details (code example) and I could see how to adapt the file. |
Here is an example showing the default behavior of angularjs with drop down list: |
ok, i see. the problem occurs when relying on "some black magic casted by a evil wizard" and the select element is loaded within an angular template. |
I have added a new version fixing some minor issues. |
webermax, Well for me it is working (based on the information you shared). Here you can find an example containing 2 drop down lists: The first one is a ‘select’ generated from markup in the page. The second drop down list is the one that could interest you I think. Hope this helps. |
Big update on the file. I also changed the use of DOMNodeInserted and DOMNodeRemoved with the more recent MutationObserver because there was a problem I noticed only with Firefox when the select input was loaded from angularjs SPA page (single page application). |
I fixed a bug on IE when there was an empty value in the dropdown. |
This version is compatible with angularjs select list generated with ng-options.
The code added could maybe be write in a nicer way, feel free to do so.