Skip to content

Commit

Permalink
feat: configurable data request parallelization
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Kullman authored and cristinecula committed Apr 15, 2020
1 parent c251fbc commit 13a284a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cosmoz-data-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,14 @@ class CosmozDataNav extends translatable(mixinBehaviors([IronResizableBehavior],
hiddenRendering: {
type: Boolean,
value: false
},

/**
* Whether we should request data for all preloaded items at once or one at a time
*/
parallelDataRequests: {
type: Boolean,
value: false
}
};
}
Expand Down Expand Up @@ -719,6 +727,9 @@ class CosmozDataNav extends translatable(mixinBehaviors([IronResizableBehavior],
render: true
}
}));
if (!this.parallelDataRequests) {
return;
}
}

if (index >= Math.min(this.selected + this.preload, items.length - 1)) {
Expand Down

0 comments on commit 13a284a

Please sign in to comment.