making sure we dont save invalid forms

This commit is contained in:
Jamie V 2025-01-06 13:59:25 -08:00
parent 3ecb9d4355
commit f68fdb03bc

View File

@ -158,7 +158,7 @@ export default {
this.$emit('on-save');
},
handleKeyDown({ key }) {
if (key === 'Enter') {
if (key === 'Enter' && !this.isInvalid) {
this.onSave();
} else if (key === 'Escape') {
this.onCancel();