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

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