mirror of
https://github.com/zadam/trilium.git
synced 2025-03-04 19:13:37 +08:00
update section container on attribute change, closes #1646
This commit is contained in:
parent
1af98056bb
commit
3b4fa0c5fc
3 changed files with 7 additions and 2 deletions
|
@ -122,7 +122,7 @@ export default class CollapsibleSectionContainer extends TabAwareWidget {
|
|||
});
|
||||
}
|
||||
|
||||
async refreshWithNote(note) {
|
||||
async refreshWithNote(note, noExplicitActivation = false) {
|
||||
let $sectionToActivate, $lastActiveSection;
|
||||
|
||||
this.$titleContainer.empty().append('<div class="section-title section-title-empty">');
|
||||
|
@ -141,7 +141,7 @@ export default class CollapsibleSectionContainer extends TabAwareWidget {
|
|||
this.$titleContainer.append($sectionTitle);
|
||||
this.$titleContainer.append('<div class="section-title section-title-empty">');
|
||||
|
||||
if (ret.activate && !$sectionToActivate) {
|
||||
if (ret.activate && !$sectionToActivate && !noExplicitActivation) {
|
||||
$sectionToActivate = $sectionTitle;
|
||||
}
|
||||
|
||||
|
@ -161,4 +161,8 @@ export default class CollapsibleSectionContainer extends TabAwareWidget {
|
|||
this.$bodyContainer.find('.section-body').removeClass("active");
|
||||
}
|
||||
}
|
||||
|
||||
refreshSectionContainerCommand() {
|
||||
this.refreshWithNote(this.note, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,6 +293,7 @@ export default class PromotedAttributesWidget extends TabAwareWidget {
|
|||
this.refresh();
|
||||
|
||||
this.renderTitle(this.note);
|
||||
this.triggerCommand('refreshSectionContainer');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue