Skip to content

Commit

Permalink
fix(loadMinimal): preload the correct item
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayZoneYour committed Sep 30, 2019
1 parent 802edd1 commit 5744358
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -5,7 +5,7 @@
"react-native",
"ios"
],
"version": "1.6.0-rc.0",
"version": "1.6.0-rc.1",
"description": "Swiper component for React Native.",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -835,9 +835,9 @@ export default class extends Component {
(i >= index + loopVal - loadMinimalSize &&
i <= index + loopVal + loadMinimalSize) ||
// The real first swiper should be keep
i === loopVal ||
(loop && i === 1) ||
// The real last swiper should be keep
i === total - 1 + loopVal
(loop && i === total - 1)
) {
return (
<View style={pageStyle} key={i}>
Expand Down

0 comments on commit 5744358

Please sign in to comment.