Fix record lists that use old linkToParent preventing removing of parent field
This commit is contained in:
parent
08be1a1355
commit
d6aa8ef935
@ -1331,8 +1331,12 @@ export default {
|
||||
this.recordsPerPage = this.options.perPage
|
||||
|
||||
// Legacy support for linkToParent
|
||||
if (this.isOnRecordPage && this.options.linkToParent && !this.options.refField) {
|
||||
this.options.refField = (this.recordListModule.fields.find(f => f.kind === 'Record' && f.options.moduleID === this.page.moduleID) || {}).name
|
||||
if (this.isOnRecordPage && this.options.linkToParent) {
|
||||
if (this.options.refField) {
|
||||
this.options.linkToParent = false
|
||||
} else {
|
||||
this.options.refField = (this.recordListModule.fields.find(f => f.kind === 'Record' && f.options.moduleID === this.page.moduleID) || {}).name
|
||||
}
|
||||
}
|
||||
|
||||
const { moduleID, presort, prefilter, editable, refField, positionField } = this.options
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user