mirror of
https://github.com/zadam/trilium.git
synced 2025-09-11 00:56:46 +08:00
fix(views/table): inheritable checkbox not respected
This commit is contained in:
parent
40a5eee211
commit
beb1c15fa5
2 changed files with 7 additions and 5 deletions
|
@ -12,11 +12,12 @@ async function addLabel(noteId: string, name: string, value: string = "", isInhe
|
|||
});
|
||||
}
|
||||
|
||||
export async function setLabel(noteId: string, name: string, value: string = "") {
|
||||
export async function setLabel(noteId: string, name: string, value: string = "", isInheritable = false) {
|
||||
await server.put(`notes/${noteId}/set-attribute`, {
|
||||
type: "label",
|
||||
name: name,
|
||||
value: value
|
||||
value: value,
|
||||
isInheritable
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,8 @@ export default class TableColumnEditing extends Component {
|
|||
attr = {
|
||||
type: "label",
|
||||
name: `${type ?? "label"}:myLabel`,
|
||||
value: "promoted,single,text"
|
||||
value: "promoted,single,text",
|
||||
isInheritable: true
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -78,7 +79,7 @@ export default class TableColumnEditing extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
const { name, value } = this.newAttribute;
|
||||
const { name, value, isInheritable } = this.newAttribute;
|
||||
|
||||
this.api.blockRedraw();
|
||||
try {
|
||||
|
@ -88,7 +89,7 @@ export default class TableColumnEditing extends Component {
|
|||
await renameColumn(this.parentNote.noteId, type as "label" | "relation", oldName, newName);
|
||||
}
|
||||
|
||||
attributes.setLabel(this.parentNote.noteId, name, value);
|
||||
attributes.setLabel(this.parentNote.noteId, name, value, isInheritable);
|
||||
if (this.existingAttributeToEdit) {
|
||||
attributes.removeOwnedLabelByName(this.parentNote, this.existingAttributeToEdit.name);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue