ClickerMonkey / SemanticUI-Angular

Angular Directives for Semantic UI
http://clickermonkey.github.io/SemanticUI-Angular/examples/
MIT License
56 stars 28 forks source link

Selected drop down item is not updated when the model does #13

Closed evenflow58 closed 7 years ago

evenflow58 commented 7 years ago

The ignore update on the scope.$watch of the drop down box is keeping the selected value from being programmatically selected. For example if you have the following list

 { label: 'First', id: 1 },
 { label: 'Second', id: 2}
]```
Initially setting the item to 2 works just fine. However, if you then set the item to 1 the drop down does not change.
alex88 commented 7 years ago

In my case, the first time I select a dropdown value, the model is updated, but the dropdown still shows an empty value

alex88 commented 7 years ago

Same issue happens in demo page http://clickermonkey.github.io/SemanticUI-Angular/examples/dropdown/directives.html at sm-dropdown-toggle / sm-dropdown-show / sm-dropdown-hide

damonsutherland commented 7 years ago

@alex88 Although not exhaustively tested, the following pull request might provide some insight into what is going on: https://github.com/ClickerMonkey/SemanticUI-Angular/pull/23

ClickerMonkey commented 7 years ago

Closing, PR #23 was merged