Skip to content

Commit 1ab8b4d

Browse files
benotternmetulev
authored andcommitted
[improvement] make task render nothing during its initial task load (#79)
* Tasks now renders blank during initial task load * A bit more blank-on-load insurance
1 parent 98817a1 commit 1ab8b4d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/mgt-tasks/mgt-tasks.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ export class MgtTasks extends LitElement {
9090
@property() private _hiddenTasks: string[] = [];
9191
@property() private _loadingTasks: string[] = [];
9292

93+
@property() private _inTaskLoad: boolean = true;
94+
9395
private _me: User = null;
9496

9597
protected firstUpdated() {
@@ -147,6 +149,8 @@ export class MgtTasks extends LitElement {
147149
let ts = this.getTaskSource();
148150
if (!ts) return;
149151

152+
this._inTaskLoad = true;
153+
150154
this._me = await ts.me();
151155

152156
if (this.targetId) {
@@ -200,6 +204,8 @@ export class MgtTasks extends LitElement {
200204
this._drawers = drawers;
201205
this._dressers = dressers;
202206
}
207+
208+
this._inTaskLoad = false;
203209
}
204210

205211
private async addTask(
@@ -286,6 +292,8 @@ export class MgtTasks extends LitElement {
286292
}
287293

288294
protected render() {
295+
if (this._inTaskLoad) return null;
296+
289297
return html`
290298
<div class="Header">
291299
<span class="PlannerTitle">

0 commit comments

Comments
 (0)