mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 14:25:51 +01:00
improvements in widgets rendering - individual widget render is now async while composing them together to the sidebar is sync which solves some race problems
This commit is contained in:
@@ -43,7 +43,7 @@ class StandardWidget {
|
||||
|
||||
getPosition() { return this.widgetOptions.position; }
|
||||
|
||||
async render() {
|
||||
render() {
|
||||
const widgetId = `tab-${this.ctx.tabId}-widget-${this.widgetName}`;
|
||||
|
||||
this.$widget = $(WIDGET_TPL);
|
||||
@@ -73,7 +73,8 @@ class StandardWidget {
|
||||
this.$headerActions = this.$widget.find('.widget-header-actions');
|
||||
this.$headerActions.append(...this.getHeaderActions());
|
||||
|
||||
await this.renderBody();
|
||||
// actual rendering is async
|
||||
this.renderBody();
|
||||
|
||||
return this.$widget;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user