Skip to content

Commit 2c70847

Browse files
fixed issue with agenda rerendering (#342)
Co-authored-by: Shane Weaver <[email protected]>
1 parent 055bd4e commit 2c70847

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/components/mgt-agenda/mgt-agenda.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ export class MgtAgenda extends MgtTemplatedComponent {
163163
* @type {boolean}
164164
*/
165165
@property({ attribute: false }) private _isNarrow: boolean;
166-
@property({ attribute: false }) private _isLoadingEvents: boolean;
167166

168167
private _eventQuery: string;
169168
private _days: number = 3;
@@ -205,7 +204,7 @@ export class MgtAgenda extends MgtTemplatedComponent {
205204
*/
206205
public render(): TemplateResult {
207206
// Loading
208-
if (this.isLoadingState && !this._isLoadingEvents) {
207+
if (!this.events && this.isLoadingState) {
209208
return this.renderLoading();
210209
}
211210

@@ -230,7 +229,7 @@ export class MgtAgenda extends MgtTemplatedComponent {
230229
return html`
231230
<div class="agenda${this._isNarrow ? ' narrow' : ''}${this.groupByDay ? ' grouped' : ''}">
232231
${this.groupByDay ? this.renderGroups(events) : this.renderEvents(events)}
233-
${this._isLoadingEvents ? this.renderLoading() : html``}
232+
${this.isLoadingState ? this.renderLoading() : html``}
234233
</div>
235234
`;
236235
}
@@ -528,7 +527,6 @@ export class MgtAgenda extends MgtTemplatedComponent {
528527
const iterator = await getEventsPageIterator(graph, start, end, this.groupId);
529528

530529
if (iterator && iterator.value) {
531-
this._isLoadingEvents = true;
532530
this.events = iterator.value;
533531

534532
while (iterator.hasNext) {
@@ -538,8 +536,6 @@ export class MgtAgenda extends MgtTemplatedComponent {
538536
}
539537
} catch (error) {
540538
// noop - possible error with graph
541-
} finally {
542-
this._isLoadingEvents = false;
543539
}
544540
}
545541
}

0 commit comments

Comments
 (0)