vladotesanovic / ngSemantic

Angular 2 building blocks :package: based on Semantic UI
https://ng-semantic.herokuapp.com/
MIT License
973 stars 148 forks source link

sm-select model binding doesn't work #173

Open RobinJ1995 opened 7 years ago

RobinJ1995 commented 7 years ago

To make sure, I have taken the example from the documentation you provide;

<sm-select
    [options]="{direction: 'upward'}"
    [(model)]="gender" placeholder="Select gender..."
    class="fluid">
    <option value="m"><i class="icon male"></i> Male</option>
    <option value="f"><i class="icon female"></i> Female</option>
</sm-select>

Yet gender in my component remains undefined after a selection has been made in the sm-select component.

martinmanzo commented 7 years ago

I'm having the opposite problem. If I clean the selected items array in the controller, the view doesn't update and items remain selected.