mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 09:35:39 -05:00
Fix wizard not displaying error messages (#8545)
This commit is contained in:
@@ -481,19 +481,23 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
this._messageDetail.innerText = description;
|
||||
}
|
||||
DOM.removeNode(this._messageDetail);
|
||||
if (this._messageSummaryText) {
|
||||
if (this._useDefaultMessageBoxLocation) {
|
||||
DOM.prepend(this._modalContent, (this._messageElement));
|
||||
}
|
||||
} else {
|
||||
// Set the focus manually otherwise it'll escape the dialog to something behind it
|
||||
this.setInitialFocusedElement();
|
||||
DOM.removeNode(this._messageElement);
|
||||
}
|
||||
this.messagesElementVisible = !!this._messageSummaryText;
|
||||
this.updateExpandMessageState();
|
||||
}
|
||||
}
|
||||
|
||||
protected set messagesElementVisible(visible: boolean) {
|
||||
if (visible) {
|
||||
if (this._useDefaultMessageBoxLocation) {
|
||||
DOM.prepend(this._modalContent, (this._messageElement));
|
||||
}
|
||||
} else {
|
||||
// Set the focus manually otherwise it'll escape the dialog to something behind it
|
||||
this.setInitialFocusedElement();
|
||||
DOM.removeNode(this._messageElement);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set spinner element to show or hide
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,7 @@ export class WizardModal extends Modal {
|
||||
private _body: HTMLElement;
|
||||
|
||||
private _pageContainer: HTMLElement;
|
||||
private _mpContainer: HTMLElement;
|
||||
|
||||
// Buttons
|
||||
private _previousButton: Button;
|
||||
@@ -130,9 +131,8 @@ export class WizardModal extends Modal {
|
||||
|
||||
this.initializeNavigation(this._body);
|
||||
|
||||
const mpContainer = append(this._body, $('div.dialog-message-and-page-container'));
|
||||
mpContainer.append(this._messageElement);
|
||||
this._pageContainer = append(mpContainer, $('div.dialogModal-page-container'));
|
||||
this._mpContainer = append(this._body, $('div.dialog-message-and-page-container'));
|
||||
this._pageContainer = append(this._mpContainer, $('div.dialogModal-page-container'));
|
||||
|
||||
this._wizard.pages.forEach(page => {
|
||||
this.registerPage(page);
|
||||
@@ -152,6 +152,15 @@ export class WizardModal extends Modal {
|
||||
this.updatePageNumbers();
|
||||
}
|
||||
|
||||
protected set messagesElementVisible(visible: boolean) {
|
||||
if (visible) {
|
||||
this._mpContainer.prepend(this._messageElement);
|
||||
} else {
|
||||
// Let base class handle it
|
||||
super.messagesElementVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private updatePageNumbers(): void {
|
||||
this._wizard.pages.forEach((page, index) => {
|
||||
let dialogPane = this._dialogPanes.get(page);
|
||||
|
||||
Reference in New Issue
Block a user