Skip to content

Commit 9b44ba3

Browse files
committed
save customer input in global context
1 parent 37fae08 commit 9b44ba3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/core/src/awsService/appBuilder/wizards/templateParametersWizard.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createExitPrompter } from '../../../shared/ui/common/exitPrompter'
99
import * as CloudFormation from '../../../shared/cloudformation/cloudformation'
1010
import { createInputBox } from '../../../shared/ui/inputPrompter'
1111
import { createCommonButtons } from '../../../shared/ui/buttons'
12-
import { getRecentResponse } from '../../../shared/sam/utils'
12+
import { getRecentResponse, updateRecentResponse } from '../../../shared/sam/utils'
1313
import { getParameters } from '../../../lambda/config/parameterUtils'
1414

1515
export class TemplateParametersWizard extends Wizard<any> {
@@ -36,7 +36,12 @@ export class TemplateParametersWizard extends Wizard<any> {
3636
const defaultValue = this.preloadedTemplate.Parameters
3737
? (this.preloadedTemplate.Parameters[name]?.Default as string)
3838
: undefined
39-
this.form[name].bindPrompter(() => this.createParamPromptProvider(name, defaultValue))
39+
this.form[name].bindPrompter(() =>
40+
this.createParamPromptProvider(name, defaultValue).transform(async (item) => {
41+
await updateRecentResponse(this.commandMementoRootKey, this.template.fsPath, name, item)
42+
return item
43+
})
44+
)
4045
}
4146
})
4247

0 commit comments

Comments
 (0)