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,6 +15,7 @@ | ||
15 | /// | 15 | /// |
16 | 16 | ||
17 | import { | 17 | import { |
18 | + ChangeDetectorRef, | ||
18 | Component, | 19 | Component, |
19 | ElementRef, | 20 | ElementRef, |
20 | forwardRef, | 21 | forwardRef, |
@@ -113,7 +114,8 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato | @@ -113,7 +114,8 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato | ||
113 | constructor(public elementRef: ElementRef, | 114 | constructor(public elementRef: ElementRef, |
114 | private translate: TranslateService, | 115 | private translate: TranslateService, |
115 | private dialogs: DialogService, | 116 | private dialogs: DialogService, |
116 | - protected store: Store<AppState>) { | 117 | + protected store: Store<AppState>, |
118 | + private cd: ChangeDetectorRef) { | ||
117 | } | 119 | } |
118 | 120 | ||
119 | ngOnInit(): void { | 121 | ngOnInit(): void { |
@@ -216,8 +218,8 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato | @@ -216,8 +218,8 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato | ||
216 | } | 218 | } |
217 | 219 | ||
218 | private onIconClick(key: (string | number)[], | 220 | private onIconClick(key: (string | number)[], |
219 | - val: string, | ||
220 | - iconSelectedFn: (icon: string) => void) { | 221 | + val: string, |
222 | + iconSelectedFn: (icon: string) => void) { | ||
221 | this.dialogs.materialIconPicker(val).subscribe((icon) => { | 223 | this.dialogs.materialIconPicker(val).subscribe((icon) => { |
222 | if (icon && iconSelectedFn) { | 224 | if (icon && iconSelectedFn) { |
223 | iconSelectedFn(icon); | 225 | iconSelectedFn(icon); |
@@ -229,6 +231,7 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato | @@ -229,6 +231,7 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato | ||
229 | this.targetFullscreenElement = element; | 231 | this.targetFullscreenElement = element; |
230 | this.isFullscreen = !this.isFullscreen; | 232 | this.isFullscreen = !this.isFullscreen; |
231 | this.fullscreenFinishFn = fullscreenFinishFn; | 233 | this.fullscreenFinishFn = fullscreenFinishFn; |
234 | + this.cd.markForCheck(); | ||
232 | } | 235 | } |
233 | 236 | ||
234 | onFullscreenChanged(fullscreen: boolean) { | 237 | onFullscreenChanged(fullscreen: boolean) { |