@momo-kits/carousel 0.0.56-beta.1 → 0.0.56-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CarouselV2.js +5 -3
- package/package.json +1 -1
package/CarouselV2.js
CHANGED
|
@@ -1141,10 +1141,12 @@ export default class Carousel extends React.PureComponent {
|
|
|
1141
1141
|
: this.props.sliderWidth / this.props.itemWidth,
|
|
1142
1142
|
) + 1;
|
|
1143
1143
|
const initialNumPerSide = this._enableLoop() ? loopClonesPerSide : 2;
|
|
1144
|
-
const initialNumToRender =
|
|
1145
|
-
|
|
1144
|
+
const initialNumToRender =
|
|
1145
|
+
visibleItems > 2
|
|
1146
|
+
? visibleItems + initialNumPerSide * 2
|
|
1147
|
+
: initialNumPerSide * 2;
|
|
1148
|
+
const maxToRenderPerBatch = initialNumToRender;
|
|
1146
1149
|
const windowSize = maxToRenderPerBatch;
|
|
1147
|
-
|
|
1148
1150
|
const specificProps = !this._needsScrollView()
|
|
1149
1151
|
? {
|
|
1150
1152
|
initialNumToRender,
|