ngx-select-ex
ngx-select-ex copied to clipboard
blur event not working ngModel
I am using below code to catch blur event.
<ngx-select class="custom-select" [allowClear]="true" (blur)="validateTopic(EMIRATE)" (change)="validateTopic(EMIRATE)" [items]="emiratesList" #EMIRATE="ngModel" [class.is-invalid]="topicHasError && EMIRATE.touched" name="EMIRATE" [(ngModel)]="model.EMIRATE">
</ngx-select>
and below code in
export class CoverComponent implements OnInit {
constructor(){ }
validateTopic(value) {
console.log(value);
if (value === 'default') {
this.topicHasError = true;
} else {
this.topicHasError = false;
}
}
}
but its not firing event.
Any help would be highly appreciated.
Thanks,
@m-saifuddin Please, make a fork of https://stackblitz.com/edit/ngx-select-ex-issues-100 And reproduce the error to save my time. As soon as I will see it I'll try to fix it. Thanks!