Fixed the generate script logic for notebook wizards. (#13418)

* Fixed the generate script logic for notebook wizards.

* -reverted previous changes
-added last page check to the page validation change logic.

* checking if the page is valid when entering it.

* removing unnecessary index variable in forEach loop

* added comments for generate script button enabling on notebookwizard page.
This commit is contained in:
Aasim Khan
2020-11-17 10:26:45 -08:00
committed by GitHub
parent 472c9decfa
commit 438bc67072

View File

@@ -100,6 +100,12 @@ export class NotebookWizardPage extends ResourceTypePage {
await setModelValues(this._model.inputComponents, this.wizard.model);
}
/**
* Enabling or disabling the generate script button based on page validity.
* Since it is a shared button, we have to run this logic every time the user enters the page to reflect the current page status.
*/
this.wizard.wizardObject.generateScriptButton.enabled = this.pageObject.valid;
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
this.wizard.wizardObject.message = { text: '' };