File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
packages/angular-material/src/controls Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export class RangeControlRenderer extends JsonFormsControl {
5555 max : number ;
5656 multipleOf : number ;
5757
58- constructor ( jsonformsService : JsonFormsAngularService , private changeDetectorRef :ChangeDetectorRef ) {
58+ constructor ( jsonformsService : JsonFormsAngularService , private changeDetectorRef : ChangeDetectorRef ) {
5959 super ( jsonformsService ) ;
6060 }
6161 getEventValue = ( event : any ) => Number ( event . value ) ;
@@ -65,7 +65,7 @@ export class RangeControlRenderer extends JsonFormsControl {
6565 this . max = this . scopedSchema . maximum ;
6666 this . multipleOf = this . scopedSchema . multipleOf || 1 ;
6767 }
68- this . changeDetectorRef . detectChanges ( ) ;
68+ this . changeDetectorRef . markForCheck ( ) ;
6969 }
7070}
7171export const RangeControlRendererTester : RankedTester = rankWith (
Original file line number Diff line number Diff line change 2222 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2323 THE SOFTWARE.
2424*/
25- import { ChangeDetectionStrategy , Component } from '@angular/core' ;
25+ import { ChangeDetectionStrategy , Component , ChangeDetectorRef } from '@angular/core' ;
2626import { JsonFormsAngularService , JsonFormsControl } from '@jsonforms/angular' ;
2727import {
2828 and ,
@@ -51,11 +51,14 @@ import {
5151 changeDetection : ChangeDetectionStrategy . OnPush
5252} )
5353export class ToggleControlRenderer extends JsonFormsControl {
54- constructor ( jsonformsService : JsonFormsAngularService ) {
54+ constructor ( jsonformsService : JsonFormsAngularService , private changeDetectorRef : ChangeDetectorRef ) {
5555 super ( jsonformsService ) ;
5656 }
5757 isChecked = ( ) => this . data || false ;
5858 getEventValue = ( event : any ) => event . checked ;
59+ mapAdditionalProps ( ) {
60+ this . changeDetectorRef . markForCheck ( ) ;
61+ }
5962}
6063
6164export const ToggleControlRendererTester : RankedTester = rankWith (
You can’t perform that action at this time.
0 commit comments