Skip to content

Commit

Permalink
force changeDetection in ngOnInit to init with provenance and then in…
Browse files Browse the repository at this point in the history
… afterviewinit update provenance
  • Loading branch information
arpitnarechania committed Sep 30, 2024
1 parent 24ad011 commit fb4cb17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/app/applications/data-distribution/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class DataDistributionComponent implements OnInit, AfterViewInit {

ngAfterViewInit(): void {
let context = this;

context.widgetModel['singleSlider']['model']['provenance'] = {
revalidate: true,
"data": [
Expand Down Expand Up @@ -624,10 +625,12 @@ export class DataDistributionComponent implements OnInit, AfterViewInit {
};
context.widgetModel['inputText']['isFrozen'] = true;


// Detect changes
context.changeDetectorRef.detectChanges();
}

ngOnInit(): void {}
ngOnInit(): void {
let context = this;
context.changeDetectorRef.detectChanges();
}
}
3 changes: 2 additions & 1 deletion src/app/applications/scented-widgets/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,12 @@ export class ScentedWidgetsComponent implements OnInit, AfterViewInit {
};
context.widgetModel['inputText']['isFrozen'] = true;


// Detect changes
context.changeDetectorRef.detectChanges();
}

ngOnInit(): void {
let context = this;
context.changeDetectorRef.detectChanges();
}
}

0 comments on commit fb4cb17

Please sign in to comment.