mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
Check whether page is valid before enabling next button. (#2293)
This commit is contained in:
@@ -197,8 +197,9 @@ export class WizardModal extends Modal {
|
||||
|
||||
if (this._nextButton && this._doneButton) {
|
||||
if (this._wizard.pages[index + 1]) {
|
||||
let isPageValid = this._wizard.pages[index] && this._wizard.pages[index].valid;
|
||||
this._nextButton.element.parentElement.classList.remove('dialogModal-hidden');
|
||||
this._nextButton.enabled = this._wizard.pages[index + 1].enabled;
|
||||
this._nextButton.enabled = isPageValid && this._wizard.pages[index + 1].enabled;
|
||||
this._doneButton.element.parentElement.classList.add('dialogModal-hidden');
|
||||
} else {
|
||||
this._nextButton.element.parentElement.classList.add('dialogModal-hidden');
|
||||
|
||||
Reference in New Issue
Block a user