feature request
@Output() event on item selected
not @Output() event on item selected
I'm currently using breeze client, that allows to update property from ngModel only.
In this case one way to update property to listen if autocomplete item selected
"@angular": "~2.4.3",
"@angular/material": "^2.0.0-beta.2",
md-option has onClose, it can be used as workaround
md-option has onSelect, is this what you want?
<md-autocomplete #appSearch="mdAutocomplete">
<md-option *ngFor="let app of apps" [value]="app.name" (onSelect)="onAppSelect(app)">
{{ app.name }}
</md-option>
</md-autocomplete>
@chouclee Yes, i've used md-option's onClose, it'd be nice to see it it in examples somewhere!
As a note, the api changes from onSelect to onSelectionChange in #2722 to account for select/deselect of multiple options.
Guys onSelect method not exists.
I used onSelectionChange instead of onSelect.
{{ option.viewValue }}
test(item){
console.log(item);
}.
But I only see undefined in console. Is there anything wrong here?
@rupinr
Instead of (onSelectionChange)="test($item)" use (onSelectionChange)="test(option)"
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
@rupinr
Instead of (onSelectionChange)="test($item)" use (onSelectionChange)="test(option)"