3
0

Fix record lists that use old linkToParent preventing removing of parent field

This commit is contained in:
Jože Fortun 2024-09-24 12:19:41 +02:00
parent 08be1a1355
commit d6aa8ef935

View File

@ -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