From 6671b873b4aa8d507b35519f0bc3d3d01eaa7d0c Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sun, 20 Dec 2020 17:33:22 -0700 Subject: [PATCH] Listen for changes in the show property so we can reset the content data value. --- web/src/components/Modal.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/src/components/Modal.vue b/web/src/components/Modal.vue index af6f024..cdcc3ab 100644 --- a/web/src/components/Modal.vue +++ b/web/src/components/Modal.vue @@ -39,6 +39,18 @@ export default { }; }, }, + watch: { + show(newVal) { + /** + * This method is used to re-set the animation for the modal when + * the modal is closed through changing the `show` property rather + * than having a `closed` event emitted. + */ + if (!newVal) { + this.content = false; + } + }, + }, }