mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 18:39:01 +01:00
feat(board/promoted_attributes): render non-promoted attribute defs too
This commit is contained in:
parent
fd9b6e9e67
commit
5dbe9e7da6
@ -839,8 +839,7 @@ export default class FNote {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const promotedAttrs = this.getAttributes()
|
const promotedAttrs = this.getAttributeDefinitions()
|
||||||
.filter((attr) => attr.isDefinition())
|
|
||||||
.filter((attr) => {
|
.filter((attr) => {
|
||||||
const def = attr.getDefinition();
|
const def = attr.getDefinition();
|
||||||
|
|
||||||
@ -860,6 +859,11 @@ export default class FNote {
|
|||||||
return promotedAttrs;
|
return promotedAttrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getAttributeDefinitions() {
|
||||||
|
return this.getAttributes()
|
||||||
|
.filter((attr) => attr.isDefinition());
|
||||||
|
}
|
||||||
|
|
||||||
hasAncestor(ancestorNoteId: string, followTemplates = false, visitedNoteIds: Set<string> | null = null) {
|
hasAncestor(ancestorNoteId: string, followTemplates = false, visitedNoteIds: Set<string> | null = null) {
|
||||||
if (this.noteId === ancestorNoteId) {
|
if (this.noteId === ancestorNoteId) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -91,7 +91,7 @@ function formatRelation(attr: AttributeWithDefinitions): ComponentChildren {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getAttributesWithDefinitions(note: FNote, attributesToIgnore: string[] = []): AttributeWithDefinitions[] {
|
function getAttributesWithDefinitions(note: FNote, attributesToIgnore: string[] = []): AttributeWithDefinitions[] {
|
||||||
const promotedDefinitionAttributes = note.getPromotedDefinitionAttributes();
|
const promotedDefinitionAttributes = note.getAttributeDefinitions();
|
||||||
const result: AttributeWithDefinitions[] = [];
|
const result: AttributeWithDefinitions[] = [];
|
||||||
for (const attr of promotedDefinitionAttributes) {
|
for (const attr of promotedDefinitionAttributes) {
|
||||||
const def = attr.getDefinition();
|
const def = attr.getDefinition();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user