You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to pass changes of autocomplete child component to parent component using event emitter,It is working fine when i use (onSelect) event of autocomplete I am able to pass changes in model to parent component but i also want to pass changes of ng model to parent on blur event also.Below is my child component code .I want to use (blur) event instead of (onSelect).
I am trying to pass changes of autocomplete child component to parent component using event emitter,It is working fine when i use (onSelect) event of autocomplete I am able to pass changes in model to parent component but i also want to pass changes of ng model to parent on blur event also.Below is my child component code .I want to use (blur) event instead of (onSelect).
@Component({ selector: 'product-name-autoComplete', directives: [AutoComplete], template:
< p-autoComplete (change)="setLabel(product)" [(ngModel)]="product" [suggestions]="filteredData" (completeMethod)="filterData($event)" [size]="30"
[minLength]="1" placeholder="Enter Product Name" [dropdown]="false" field="name" >
< template let-brand >
< li class="ui-autocomplete-list-item ui-helper-clearfix">
< div style="float:left">{{brand.name}}< /div >
< /li >
< /template >
< /p-autoComplete >
, providers: [HTTP_PROVIDERS] })
`export class productAutocomplete {
@input() products: any[];
@output() onChange = new EventEmitter();
}
`
The text was updated successfully, but these errors were encountered: