Skip to content

Commit

Permalink
Support cmd+s to save on Fieldset and Navagition form pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmcdade committed Nov 18, 2020
1 parent d9396a8 commit b77a8d2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion resources/js/components/fieldsets/EditForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,14 @@ export default {
this.fieldset.fields.splice(e.newIndex, 0, this.fieldset.fields.splice(e.oldIndex, 1)[0]);
});
}
},
}
created() {
this.$keys.bindGlobal(['mod+s'], e => {
e.preventDefault();
this.save();
});
},
}
</script>
9 changes: 8 additions & 1 deletion resources/js/components/navigation/EditForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ export default {
}
},
}
},
created() {
this.$keys.bindGlobal(['mod+s'], e => {
e.preventDefault();
this.submit();
});
},
}
</script>

0 comments on commit b77a8d2

Please sign in to comment.