From 44779dad63fa0c78df84487115fb97a32dd64c3f Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Thu, 4 Aug 2022 14:57:30 -0400 Subject: adding loading barrier before the poll is complete. now polls on open of modal instead of app. --- src/client/util/ReportManager.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/util/ReportManager.tsx b/src/client/util/ReportManager.tsx index 7d8f02bb8..f63661c1a 100644 --- a/src/client/util/ReportManager.tsx +++ b/src/client/util/ReportManager.tsx @@ -29,7 +29,8 @@ export class ReportManager extends React.Component<{}> { private octokit: Octokit; - public issues: any[] = []; + @observable public issues: any[] = []; + @action setIssues = action((issues: any[]) => { this.issues = issues; }); @observable public shownIssues = this.issues.filter(issue => issue.state === 'open'); @@ -46,7 +47,7 @@ export class ReportManager extends React.Component<{}> { ReportManager.Instance = this; this.octokit = new Octokit({ - auth: 'key' + auth: 'auth key' }); } @@ -56,7 +57,7 @@ export class ReportManager extends React.Component<{}> { // load in the issues if not already loaded this.getAllIssues() .then(issues => { - this.issues = issues + this.setIssues(issues); this.updateIssueSearch(); }) .catch(err => console.log(err)); @@ -124,7 +125,7 @@ export class ReportManager extends React.Component<{}> {
this.updateIssueSearch(e.target.value))}>

Previous Issues

- {this.shownIssues.map(issue =>
{issue.title}
)} + {this.issues.length === 0 ?
loading
: this.shownIssues.map(issue =>
{issue.title}
)}
-- cgit v1.2.3-70-g09d2