Bug
Trigger the MatSelectChange when setting the select value programmatically
The value of the dropdown is set, but no event is triggered
https://stackblitz.com/edit/angular-lkuscv
Angular Material 5.2.5
The selectionChange event only fires when the value was changed by the user. From the docs:
Event emitted when the selected value has been changed by the user
The valueChange event should fire for all value changes.
How would one then manually trigger that selectionChange to force the MatSelectTrigger to display desired text?
How would one then manually trigger that selectionChange to force the MatSelectTrigger to display desired text?
Having the same issue here where a initial selection is not showing up 馃槥
@CAspeling did you find a solution?
@tdhulster I have not. I can't even get
this.mySelect.selectionChange.emit(new MatSelectChange(this.mySelect, 'example text'));
to trigger the change if button of some kind got clicked.
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._
Most helpful comment
How would one then manually trigger that selectionChange to force the MatSelectTrigger to display desired text?