From 87b892d13fbe763bf13d7c405f0d242e4a56d574 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Fri, 3 Apr 2020 08:57:57 -0700 Subject: [PATCH] Update step when page is navigated to (#9839) --- .../services/dialog/browser/dialogContainer.component.ts | 4 +++- src/sql/workbench/services/dialog/browser/wizardModal.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/services/dialog/browser/dialogContainer.component.ts b/src/sql/workbench/services/dialog/browser/dialogContainer.component.ts index a077b7f0ace..5bce41b323a 100644 --- a/src/sql/workbench/services/dialog/browser/dialogContainer.component.ts +++ b/src/sql/workbench/services/dialog/browser/dialogContainer.component.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import 'vs/css!./media/dialogModal'; -import { Component, ViewChild, Inject, forwardRef, ElementRef, AfterViewInit } from '@angular/core'; +import { Component, ViewChild, Inject, forwardRef, ElementRef, AfterViewInit, ChangeDetectorRef } from '@angular/core'; import { ModelViewContent } from 'sql/workbench/browser/modelComponents/modelViewContent.component'; import { DialogPane } from 'sql/workbench/services/dialog/browser/dialogPane'; import { Event, Emitter } from 'vs/base/common/event'; @@ -50,6 +50,7 @@ export class DialogContainer implements AfterViewInit { @ViewChild(ModelViewContent) private _modelViewContent: ModelViewContent; constructor( @Inject(forwardRef(() => ElementRef)) private _el: ElementRef, + @Inject(forwardRef(() => ChangeDetectorRef)) private _changeRef: ChangeDetectorRef, @Inject(IBootstrapParams) private _params: DialogComponentParams) { this.modelViewId = this._params.modelViewId; this._params.onLayoutRequested(layoutParams => { @@ -73,5 +74,6 @@ export class DialogContainer implements AfterViewInit { public layout(): void { this._modelViewContent.layout(); + this._changeRef.detectChanges(); } } diff --git a/src/sql/workbench/services/dialog/browser/wizardModal.ts b/src/sql/workbench/services/dialog/browser/wizardModal.ts index 271d49bee22..0a8eeb500dd 100644 --- a/src/sql/workbench/services/dialog/browser/wizardModal.ts +++ b/src/sql/workbench/services/dialog/browser/wizardModal.ts @@ -190,6 +190,7 @@ export class WizardModal extends Modal { this._dialogPanes.forEach((dialogPane, page) => { if (page === pageToShow) { dialogPaneToShow = dialogPane; + dialogPane.layout(true); dialogPane.show(focus); } else { dialogPane.hide();