Skip to content

Commit

Permalink
Merge pull request #3465 from himdel/no-records-bz1548121
Browse files Browse the repository at this point in the history
GTL: Hide pagination on no records
(cherry picked from commit 77153f9)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553316
  • Loading branch information
mzazrivec authored and simaishi committed Mar 8, 2018
1 parent 3d453f9 commit 0a7ffb0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/assets/javascripts/controllers/report_data_controller.js
Expand Up @@ -313,10 +313,16 @@
}
this.setDefaults();
this.movePagination();

// pagination doesn't update on no records (components/data-table/data-table.html:4:99), hide it instead
if (! this.gtlData.rows.length) {
this.setExtraClasses();
}

this.$timeout(function() {
this.$window.ManageIQ.gtl.loading = false;
this.$window.ManageIQ.gtl.isFirst = this.settings.current === 1;
this.$window.ManageIQ.gtl.isLast = this.settings.current === this.settings.totla;
this.$window.ManageIQ.gtl.isLast = this.settings.current === this.settings.total;
}.bind(this));
return data;
}.bind(this));
Expand Down

0 comments on commit 0a7ffb0

Please sign in to comment.