Reputation: 1185
I currently have two vue methods:
(1) this.get_saved_searches()
(2) this.update_default_select_option()
How can I make method(2) only run when method(1) is finished?
Upvotes: 0
Views: 5158
Reputation: 161
In addition to what Derek Pollard mentioned, Have both the methods return promises and use async/await to achieve what you're looking for
Sources: Promises; async/await
async bar(){
await this.get_saved_searches();
await this.update_default_select_option();
}
Upvotes: 2