md-select : onSelect emitted before ngModel updated
beta-1 BUG: onSelected is emitted before the model (ngModel) updated , not showing the current state of the model.
@nadavten Can you clarify your use case? In most cases, you shouldn't need to use ngModel and onSelect together (there should be one source of truth for value changes). Typically in that case you'd want (ngModelChange).
i want to update my model property and update some other model properties depending on that model. i didnt know there 'ngModelChanged' in md-select. and if there is it makes me wonder why there is 'onSelect' ?
On Wed, Feb 8, 2017, 02:04 Kara [email protected] wrote:
@nadavten https://github.com/nadavten Can you clarify your use case? In most cases, you shouldn't need to use ngModel and onSelect together. Typically in that case you'd want (ngModelChange)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/material2/issues/2972#issuecomment-278185634, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ-rrC9oWn_UYeqle6_FRh8caJFF9cJqks5raQZ0gaJpZM4L6HFH .
ngModelChanged is simply a part of @angular/forms intergration. onSelect is there if you need to use md-select without @angular/forms.
As @fxck mentioned, ngModelChange is part of the Angular core FormsModule. Select just integrates with it. You can use onSelect if you aren't using one of the forms modules, but they aren't intended to be used together in this way. As there is already a recommended way to get your use case working, I'm going to close this.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.