Skip to content

Commit

Permalink
Fixed: selected picker getting updated on closing modal post selectio…
Browse files Browse the repository at this point in the history
…n without saving(hotwax#447)
  • Loading branch information
amansinghbais committed Oct 22, 2024
1 parent 0a61f70 commit cfbc70d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/EditPickerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default defineComponent({
text: translate("Replace"),
handler: () => {
this.resetPicker().then(() => {
this.closeModal()
this.closeModal({ selectedPicker: this.selectedPicker })
})
}
}
Expand All @@ -249,8 +249,8 @@ export default defineComponent({
logger.error('Something went wrong, could not edit picker')
}
},
closeModal() {
modalController.dismiss({ selectedPicker: this.selectedPicker });
closeModal(payload = {}) {
modalController.dismiss({ dismissed: true, ...payload });
},
getAlreadyAssignedPicker() {
this.selectedPicker = this.availablePickers.find((picker: any) => this.selectedPickerId === picker.id)
Expand Down

0 comments on commit cfbc70d

Please sign in to comment.