1
- import { EventEmitter , ElementRef } from '@angular/core' ;
1
+ import { EventEmitter , ElementRef , ChangeDetectorRef } from '@angular/core' ;
2
2
import { getValue , setValue , isNullOrUndefined , isObject } from '@syncfusion/ej2-base' ;
3
3
import { ControlValueAccessor } from '@angular/forms' ;
4
4
/**
@@ -30,6 +30,7 @@ export class FormBase<T> implements ControlValueAccessor {
30
30
public preventChange : boolean ;
31
31
public isUpdated : boolean ;
32
32
public oldValue : any ;
33
+ public cdr : ChangeDetectorRef ;
33
34
34
35
public localChange ( e : { value ?: T , checked ?: T } ) : void {
35
36
//tslint:disable-next-line
@@ -61,6 +62,7 @@ export class FormBase<T> implements ControlValueAccessor {
61
62
}
62
63
}
63
64
}
65
+ this . cdr . markForCheck ( ) ;
64
66
}
65
67
66
68
public properties : Object ;
@@ -131,6 +133,7 @@ export class FormBase<T> implements ControlValueAccessor {
131
133
// When binding Html textbox value to syncfusion textbox, change event triggered dynamically.
132
134
// To prevent change event, trigger change in component side based on `preventChange` value
133
135
this . preventChange = this . isFormInit ? false : true ;
136
+ this . cdr . markForCheck ( ) ;
134
137
if ( value === null ) {
135
138
return ;
136
139
}
@@ -142,6 +145,7 @@ export class FormBase<T> implements ControlValueAccessor {
142
145
if ( this . skipFromEvent !== true ) {
143
146
this . focus . emit ( e ) ;
144
147
}
148
+ this . cdr . markForCheck ( ) ;
145
149
}
146
150
147
151
public ngOnBlur ( e : Event ) : void {
@@ -150,5 +154,6 @@ export class FormBase<T> implements ControlValueAccessor {
150
154
if ( this . skipFromEvent !== true ) {
151
155
this . blur . emit ( e ) ;
152
156
}
157
+ this . cdr . markForCheck ( ) ;
153
158
}
154
159
}
0 commit comments