From 438bc6707212e74d8955cc4dbe806b494f404043 Mon Sep 17 00:00:00 2001 From: Aasim Khan Date: Tue, 17 Nov 2020 10:26:45 -0800 Subject: [PATCH] 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. --- .../src/ui/notebookWizard/notebookWizardPage.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/resource-deployment/src/ui/notebookWizard/notebookWizardPage.ts b/extensions/resource-deployment/src/ui/notebookWizard/notebookWizardPage.ts index 26aa09d017..4229ebfe16 100644 --- a/extensions/resource-deployment/src/ui/notebookWizard/notebookWizardPage.ts +++ b/extensions/resource-deployment/src/ui/notebookWizard/notebookWizardPage.ts @@ -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: '' };