Skip to content

Commit

Permalink
Allow fetchMore to actually specify a 0 offset when intentional. This…
Browse files Browse the repository at this point in the history
… should fix the mysterious missing history in multiview bug.
  • Loading branch information
dannon committed Sep 14, 2017
1 parent 140c570 commit 7fdce2e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
Expand Up @@ -279,7 +279,11 @@ var InfinitelyScrollingCollection = ControlledFetchCollection.extend({

// TODO: this fails in the edge case where
// the first fetch offset === limit (limit 4, offset 4, collection.length 4)
options.offset = options.reset? 0 : ( options.offset || collection.lastFetched );
if (options.reset){
options.offset = 0;
} else if (options.offset === undefined){
options.offset = collection.lastFetched;
}
var limit = options.limit = options.limit || collection.limitPerFetch || null;
// console.log( 'fetchMore, limit:', limit, 'offset:', options.offset );

Expand Down
5 changes: 3 additions & 2 deletions client/package.json
Expand Up @@ -5,8 +5,9 @@
"keywords": [
"galaxy"
],
"repository": { "type": "git",
"url": "https://github.com/galaxyproject/galaxy.git"
"repository": {
"type": "git",
"url": "https://github.com/galaxyproject/galaxy.git"
},
"license": "AFL-3.0",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/base/controlled-fetch-collection.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

0 comments on commit 7fdce2e

Please sign in to comment.