fix(TimeConductorPopup): don't submit if form is cancelled

This commit is contained in:
Jesse Mazzella 2024-07-24 15:13:41 -07:00
parent 689f7cc815
commit 83e4b44710
2 changed files with 5 additions and 9 deletions

View File

@ -88,7 +88,7 @@
<button <button
class="c-button icon-x" class="c-button icon-x"
aria-label="Discard changes and close time popup" aria-label="Discard changes and close time popup"
@click.prevent="handleFormSubmission(true)" @click.prevent="dismiss"
></button> ></button>
</div> </div>
</div> </div>
@ -322,10 +322,8 @@ export default {
this.formattedBounds.end = this.timeFormatter.format(date).split(' ')[0]; this.formattedBounds.end = this.timeFormatter.format(date).split(' ')[0];
this.validateAllBounds('endDate'); this.validateAllBounds('endDate');
}, },
hide($event) { dismiss() {
if ($event.target.className.indexOf('c-button icon-x') > -1) { this.$emit('dismiss');
this.$emit('dismiss');
}
} }
} }
}; };

View File

@ -220,10 +220,8 @@ export default {
}); });
this.$emit('dismiss'); this.$emit('dismiss');
}, },
hide($event) { hide() {
if ($event.target.className.indexOf('c-button icon-x') > -1) { this.$emit('dismiss');
this.$emit('dismiss');
}
}, },
increment($ev, ref) { increment($ev, ref) {
$ev.preventDefault(); $ev.preventDefault();