Skip to content

Commit

Permalink
Fix record organizer not prefilling group field value when adding a n…
Browse files Browse the repository at this point in the history
…ew record
  • Loading branch information
Fajfa committed Dec 2, 2024
1 parent bf2984d commit 9f3c500
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,25 @@ export default {
values[groupField] = group
}
if (this.options.displayOption === 'modal' || this.inModal) {
const route = {
name: 'page.record.create',
params: { pageID },
values,
query: null,
edit: true,
}
if (this.inModal || this.options.displayOption === 'modal') {
this.$root.$emit('show-record-modal', {
recordID: NoID,
recordPageID: (this.roRecordPage || {}).pageID,
recordPageID: pageID,
values,
edit: true,
})
} else if (this.options.displayOption === 'newTab') {
window.open(this.$router.resolve(route).href)
} else {
this.$router.push({ name: 'page.record.create', params: { pageID, values: values, refRecord: this.record } })
this.$router.push(route)
}
},
Expand Down

0 comments on commit 9f3c500

Please sign in to comment.