1- import { EventEmitter , ElementRef } from '@angular/core' ;
1+ import { EventEmitter , ElementRef , ChangeDetectorRef } from '@angular/core' ;
22import { getValue , setValue , isNullOrUndefined , isObject } from '@syncfusion/ej2-base' ;
33import { ControlValueAccessor } from '@angular/forms' ;
44/**
@@ -30,6 +30,7 @@ export class FormBase<T> implements ControlValueAccessor {
3030 public preventChange : boolean ;
3131 public isUpdated : boolean ;
3232 public oldValue : any ;
33+ public cdr : ChangeDetectorRef ;
3334
3435 public localChange ( e : { value ?: T , checked ?: T } ) : void {
3536 //tslint:disable-next-line
@@ -61,6 +62,7 @@ export class FormBase<T> implements ControlValueAccessor {
6162 }
6263 }
6364 }
65+ this . cdr . markForCheck ( ) ;
6466 }
6567
6668 public properties : Object ;
@@ -131,6 +133,7 @@ export class FormBase<T> implements ControlValueAccessor {
131133 // When binding Html textbox value to syncfusion textbox, change event triggered dynamically.
132134 // To prevent change event, trigger change in component side based on `preventChange` value
133135 this . preventChange = this . isFormInit ? false : true ;
136+ this . cdr . markForCheck ( ) ;
134137 if ( value === null ) {
135138 return ;
136139 }
@@ -142,6 +145,7 @@ export class FormBase<T> implements ControlValueAccessor {
142145 if ( this . skipFromEvent !== true ) {
143146 this . focus . emit ( e ) ;
144147 }
148+ this . cdr . markForCheck ( ) ;
145149 }
146150
147151 public ngOnBlur ( e : Event ) : void {
@@ -150,5 +154,6 @@ export class FormBase<T> implements ControlValueAccessor {
150154 if ( this . skipFromEvent !== true ) {
151155 this . blur . emit ( e ) ;
152156 }
157+ this . cdr . markForCheck ( ) ;
153158 }
154159}
0 commit comments