Commit 6ad78e545b93b0d9f8e4e8823b47e3cae4ad50f3
Committed by
GitHub
Merge pull request #5142 from vvlladd28/bug/json-form/full-screen
UI: Fixed toggle to full-screen mode editor in JSON forms
Showing
1 changed file
with
6 additions
and
3 deletions
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { |
18 | + ChangeDetectorRef, | |
18 | 19 | Component, |
19 | 20 | ElementRef, |
20 | 21 | forwardRef, |
... | ... | @@ -113,7 +114,8 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato |
113 | 114 | constructor(public elementRef: ElementRef, |
114 | 115 | private translate: TranslateService, |
115 | 116 | private dialogs: DialogService, |
116 | - protected store: Store<AppState>) { | |
117 | + protected store: Store<AppState>, | |
118 | + private cd: ChangeDetectorRef) { | |
117 | 119 | } |
118 | 120 | |
119 | 121 | ngOnInit(): void { |
... | ... | @@ -216,8 +218,8 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato |
216 | 218 | } |
217 | 219 | |
218 | 220 | private onIconClick(key: (string | number)[], |
219 | - val: string, | |
220 | - iconSelectedFn: (icon: string) => void) { | |
221 | + val: string, | |
222 | + iconSelectedFn: (icon: string) => void) { | |
221 | 223 | this.dialogs.materialIconPicker(val).subscribe((icon) => { |
222 | 224 | if (icon && iconSelectedFn) { |
223 | 225 | iconSelectedFn(icon); |
... | ... | @@ -229,6 +231,7 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato |
229 | 231 | this.targetFullscreenElement = element; |
230 | 232 | this.isFullscreen = !this.isFullscreen; |
231 | 233 | this.fullscreenFinishFn = fullscreenFinishFn; |
234 | + this.cd.markForCheck(); | |
232 | 235 | } |
233 | 236 | |
234 | 237 | onFullscreenChanged(fullscreen: boolean) { | ... | ... |