This commit is contained in:
Adorian Doran 2025-07-19 16:28:56 +03:00
commit 713a0f5b09
2 changed files with 5 additions and 3 deletions

View File

@ -296,6 +296,7 @@ interface AttributeDetailOpts {
y: number; y: number;
focus?: "name"; focus?: "name";
parent?: HTMLElement; parent?: HTMLElement;
hideMultiplicity?: boolean;
} }
interface SearchRelatedResponse { interface SearchRelatedResponse {
@ -478,7 +479,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
}); });
} }
async showAttributeDetail({ allAttributes, attribute, isOwned, x, y, focus }: AttributeDetailOpts) { async showAttributeDetail({ allAttributes, attribute, isOwned, x, y, focus, hideMultiplicity }: AttributeDetailOpts) {
if (!attribute) { if (!attribute) {
this.hide(); this.hide();
@ -529,7 +530,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
this.$rowPromotedAlias.toggle(!!definition.isPromoted); this.$rowPromotedAlias.toggle(!!definition.isPromoted);
this.$inputPromotedAlias.val(definition.promotedAlias || "").attr("disabled", disabledFn); this.$inputPromotedAlias.val(definition.promotedAlias || "").attr("disabled", disabledFn);
this.$rowMultiplicity.toggle(["label-definition", "relation-definition"].includes(this.attrType || "")); this.$rowMultiplicity.toggle(["label-definition", "relation-definition"].includes(this.attrType || "") && !hideMultiplicity);
this.$inputMultiplicity.val(definition.multiplicity || "").attr("disabled", disabledFn); this.$inputMultiplicity.val(definition.multiplicity || "").attr("disabled", disabledFn);
this.$rowLabelType.toggle(this.attrType === "label-definition"); this.$rowLabelType.toggle(this.attrType === "label-definition");

View File

@ -66,7 +66,8 @@ export default class TableColumnEditing extends Component {
isOwned: true, isOwned: true,
x: 0, x: 0,
y: 150, y: 150,
focus: "name" focus: "name",
hideMultiplicity: true
}); });
} }