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
  • Loading branch information
mzazrivec authored Feb 26, 2018
2 parents 2b0000d + 9fbc691 commit 77153f9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/assets/javascripts/controllers/report_data_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,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 77153f9

Please sign in to comment.