Skip to content

Commit

Permalink
[4.x] Ensure blueprint tabs & sections always have handles (#10014)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored May 7, 2024
1 parent e94487b commit 3df149d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/js/components/blueprints/Section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ export default {
},
editConfirmed() {
if (! this.editingSection.handle) {
this.editingSection.handle = this.$slugify(this.editingSection.display, '_');
}
this.$emit('updated', {...this.section, ...this.editingSection});
this.editingSection = false;
},
Expand Down
5 changes: 5 additions & 0 deletions resources/js/components/blueprints/Tab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,18 @@ export default {
},
editConfirmed() {
if (! this.handle) {
this.handle = this.$slugify(this.display, '_');
}
this.$emit('updated', {
...this.tab,
handle: this.handle,
display: this.display,
instructions: this.instructions,
icon: this.icon,
});
this.editing = false;
},
Expand Down

0 comments on commit 3df149d

Please sign in to comment.