Update step when page is navigated to (#9839)

This commit is contained in:
Charles Gagnon
2020-04-03 08:57:57 -07:00
committed by GitHub
parent c102322594
commit 87b892d13f
2 changed files with 4 additions and 1 deletions

View File

@@ -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();
}
}

View File

@@ -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();