fix activating ribbon tabs after note switch

This commit is contained in:
zadam 2022-06-08 23:44:43 +02:00
parent 7d76fb8bf5
commit 5fdb462ed5
2 changed files with 10 additions and 0 deletions

View File

@ -195,6 +195,12 @@ export default class RibbonContainer extends NoteContextAwareWidget {
}
}
async noteSwitched() {
this.lastActiveComponentId = null;
await super.noteSwitched();
}
async refreshWithNote(note, noExplicitActivation = false) {
this.lastNoteType = note.type;

View File

@ -168,6 +168,10 @@ const OPTION_CLASSES = [
];
export default class SearchDefinitionWidget extends NoteContextAwareWidget {
get name() {
return "searchDefinition";
}
isEnabled() {
return this.note && this.note.type === 'search';
}