Skip to content

Commit

Permalink
Add enter binding when editing blueprint sections
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Aug 27, 2024
1 parent e7fffc0 commit d058846
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions resources/js/components/blueprints/Section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default {
editingSection: false,
editingField: null,
handleSyncedWithDisplay: false,
enterBinding: null,
}
},
Expand Down Expand Up @@ -158,6 +159,15 @@ export default {
if (this.editingSection && this.handleSyncedWithDisplay) {
this.editingSection.handle = snake_case(display);
}
},
editingSection(editingSection) {
if (! editingSection) {
this.enterBinding = null;
return;
}
this.enterBinding = this.$keys.bind('enter', this.editConfirmed);
}
},
Expand Down

0 comments on commit d058846

Please sign in to comment.