{"action":"created","issue":{"url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/53","repository_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize","labels_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/53/comments","events_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/53/events","html_url":"https://github.com/InfomediaLtd/angular2-materialize/issues/53","id":162348699,"number":53,"title":"ngModel doesn't work with multiple select","user":{"login":"FoodBuster","id":11185211,"avatar_url":"https://avatars.githubusercontent.com/u/11185211?v=3","gravatar_id":"","url":"https://api.github.com/users/FoodBuster","html_url":"https://github.com/FoodBuster","followers_url":"https://api.github.com/users/FoodBuster/followers","following_url":"https://api.github.com/users/FoodBuster/following{/other_user}","gists_url":"https://api.github.com/users/FoodBuster/gists{/gist_id}","starred_url":"https://api.github.com/users/FoodBuster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoodBuster/subscriptions","organizations_url":"https://api.github.com/users/FoodBuster/orgs","repos_url":"https://api.github.com/users/FoodBuster/repos","events_url":"https://api.github.com/users/FoodBuster/events{/privacy}","received_events_url":"https://api.github.com/users/FoodBuster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-06-26T21:27:07Z","updated_at":"2016-09-27T11:12:44Z","closed_at":null,"body":"Hi,\r\n\r\nI can't get ngModel to bind to selected values in a multi-select (but single select works fine). I think the problem is that no event is being emitted when new values are selected. See sample code below. The onChange function isn't called when values are selected in the multi-select. \r\n\r\nSample html code:  \r\n```\r\n    <div class=\"input-field\">\r\n          <select materialize=\"material_select\" [ngModel]=\"shippingCountriesTemp \r\n                       (ngModelChange)=\"onChange($event)\" multiple>\r\n                             <option value=\"\" disabled selected>Click Here for Options</option>\r\n                             <option *ngFor=\"let country of countryOptions\" [value]=\"country\">{{country}}</option>\r\n           </select>\r\n           <label>Countries You Ship To</label>\r\n    </div>\r\n```\r\n\r\nonChange function (in .ts file) just prints the event value to screen:\r\n \r\n`\r\n onChange(r) {\r\n    console.log(r);\r\n  }\r\n`"},"comment":{"url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/comments/249835713","html_url":"https://github.com/InfomediaLtd/angular2-materialize/issues/53#issuecomment-249835713","issue_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/53","id":249835713,"user":{"login":"snarum","id":5821202,"avatar_url":"https://avatars.githubusercontent.com/u/5821202?v=3","gravatar_id":"","url":"https://api.github.com/users/snarum","html_url":"https://github.com/snarum","followers_url":"https://api.github.com/users/snarum/followers","following_url":"https://api.github.com/users/snarum/following{/other_user}","gists_url":"https://api.github.com/users/snarum/gists{/gist_id}","starred_url":"https://api.github.com/users/snarum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarum/subscriptions","organizations_url":"https://api.github.com/users/snarum/orgs","repos_url":"https://api.github.com/users/snarum/repos","events_url":"https://api.github.com/users/snarum/events{/privacy}","received_events_url":"https://api.github.com/users/snarum/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T11:12:44Z","updated_at":"2016-09-27T11:12:44Z","body":"When I changed my code to (input)= instead of (change)= it works for 5.1.4 also, so that's good enough for me. single select still works with (change)=. I just wasn't aware of this change.\r\n ```\r\n<select materialize=\"material_select\"  (input)=\"testing($event)\" multiple>\r\n                                    <option [value]=\"-1\" disabled>(None)</option>\r\n                                    <option [value]=\"1\" >Fugl</option>\r\n                                    <option [value]=\"2\" >Fisk</option>\r\n     </select>\r\n```\r\n"}}
{"actor":{"display_login":"snarum"}}