Skip to content

Commit

Permalink
update questions on show promt (#122)
Browse files Browse the repository at this point in the history
* update questions on show promt

* Update App.vue

* version update

* Update App.vue
  • Loading branch information
slavik-lvovsky authored Jan 23, 2020
1 parent bcb026d commit 43a049b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache 2.0",
"description": "Provide rich user experience for Yeoman generators using VSCode extension or the browser",
"repository": "https://github.com/SAP/yeoman-ui",
"version": "0.0.29",
"version": "0.0.30",
"engines": {
"vscode": "^1.39.2"
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yeoman-ui-frontend",
"displayName": "Yeoman UI Frontend",
"version": "0.2.9",
"version": "0.3.0",
"publisher": "SAP",
"license": "Apache 2.0",
"description": "Frontend for the yeoman UI framework",
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ export default {
// multiple prompts provided -- simply add them
this.prompts.push(prompt);
}
})
this.updateQuestionsFromIndex(0)
});
}
},
setQuestionProps(prompt) {
Expand Down Expand Up @@ -359,14 +358,16 @@ export default {
this.$set(question, "isWhen", question.when !== FUNCTION);
}
},
showPrompt(questions, name) {
async showPrompt(questions, name) {
const prompt = this.createPrompt(questions, name);
// evaluate message property on server if it is a function
this.setPrompts([prompt]);
await this.updateQuestionsFromIndex(0);
const promise = new Promise((resolve, reject) => {
this.resolve = resolve;
this.reject = reject;
});
return promise;
},
createPrompt(questions, name) {
Expand Down

0 comments on commit 43a049b

Please sign in to comment.