hide unlink if link is read only

This commit is contained in:
Yurii
2026-01-05 10:38:27 +02:00
parent 2efff1c310
commit 7a444a6663

View File

@@ -218,6 +218,8 @@ class RelationshipPanelView extends BottomPanelView {
this.defs.view = false;
}
const unlinkDisabled = this.defs.unlinkDisabled || this.model.getLinkParam(this.link, 'readOnly');
let hasCreate = false;
if (this.defs.create) {
@@ -375,7 +377,7 @@ class RelationshipPanelView extends BottomPanelView {
selector: '.list-container',
skipBuildRows: true,
rowActionsOptions: {
unlinkDisabled: this.defs.unlinkDisabled,
unlinkDisabled: unlinkDisabled,
editDisabled: this.defs.editDisabled,
removeDisabled: this.defs.removeDisabled,
},