From cbe14ca2a8365b34ce9274d46a442ee5086635a3 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Tue, 7 Apr 2020 16:28:01 -0700 Subject: [PATCH] nice little comment --- x-pack/plugins/reporting/public/components/report_listing.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x-pack/plugins/reporting/public/components/report_listing.tsx b/x-pack/plugins/reporting/public/components/report_listing.tsx index 8bc4967d0eadc..93dd293876f82 100644 --- a/x-pack/plugins/reporting/public/components/report_listing.tsx +++ b/x-pack/plugins/reporting/public/components/report_listing.tsx @@ -225,6 +225,9 @@ class ReportListingUi extends Component { throw error; } } + + // Since the contents of the table have changed, we must reset the pagination + // and re-fetch. Otherwise, the Nth page we are on could be empty of jobs. this.setState(() => ({ page: 0 }), this.fetchJobs); };