Skip to content

Commit

Permalink
show reached end message only if loaded items before
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasnatter authored and wachterjohannes committed Oct 12, 2015
1 parent 52f3a2a commit 2500bb0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions dist/husky.js
Original file line number Diff line number Diff line change
Expand Up @@ -32410,13 +32410,16 @@ define('husky_components/datagrid/decorators/infinite-scroll-pagination',[],func

this.sandbox.util.load(this.datagrid.data.links.next.href).then(function(data) {
this.updateDatagrid(data);
this.$paginationContainer.data('showReachedEnd', true);
this.$loader.css('opacity', '0');

promise.resolve(true);
promise.resolve();
}.bind(this))
} else {
this.$paginationContainer.addClass('reached-end');
promise.resolve(false);
if (!!this.$paginationContainer.data('showReachedEnd')) {
this.$paginationContainer.addClass('reached-end');
}
promise.resolve();
}

return promise;
Expand Down
2 changes: 1 addition & 1 deletion dist/husky.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,16 @@ define(function() {

this.sandbox.util.load(this.datagrid.data.links.next.href).then(function(data) {
this.updateDatagrid(data);
this.$paginationContainer.data('showReachedEnd', true);
this.$loader.css('opacity', '0');

promise.resolve(true);
promise.resolve();
}.bind(this))
} else {
this.$paginationContainer.addClass('reached-end');
promise.resolve(false);
if (!!this.$paginationContainer.data('showReachedEnd')) {
this.$paginationContainer.addClass('reached-end');
}
promise.resolve();
}

return promise;
Expand Down

0 comments on commit 2500bb0

Please sign in to comment.