mirror of
https://github.com/nasa/openmct.git
synced 2025-04-01 00:20:47 +00:00
making sure we dont save invalid forms
This commit is contained in:
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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user