Skip to content

Commit 04e867f

Browse files
committed
Fetch runs from data pass only if pagination did not already do so
1 parent 25d7858 commit 04e867f

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

lib/public/views/Runs/RunsModel.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,14 @@ export class RunsModel extends Observable {
114114
loadPerDataPassOverview({ dataPassId }) {
115115
if (!this._perDataPassOverviewModel.pagination.isInfiniteScrollEnabled) {
116116
this._perDataPassOverviewModel.dataPassId = parseInt(dataPassId, 10);
117-
118-
/**
119-
* `load()` will be called by the rendering of the table, triggered by pagination size
120-
* Otherwise, the call is duplicated and cascades,
121-
*/
117+
if (this._perDataPassOverviewModel.pagination._defaultItemsPerPage) {
118+
/**
119+
* If the default items per page is set, it means model has loaded already once,
120+
* so the pagination trigger will not refresh the data.
121+
* Thus, we need to trigger the load here.
122+
*/
123+
this._perDataPassOverviewModel.load();
124+
}
122125
}
123126
}
124127

0 commit comments

Comments
 (0)