Skip to content

Commit c6dc5e5

Browse files
Merge pull request #32 from godaddy/preload-nonimage
Add support for specifying max slides to render
2 parents a82a65c + e31151c commit c6dc5e5

File tree

7 files changed

+6717
-3349
lines changed

7 files changed

+6717
-3349
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 1.5.0 - Sept 2019
2+
3+
* ***(FEATURE)*** Add support for `maxRenderedSlides` prop

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,17 @@ If `true`, clicking next/previous when at the end/beginning of the slideshow wil
8484
#### lazyLoad
8585
`PropTypes.bool`
8686

87-
If `false`, the carousel will render all children at mount time and will not attempt to lazy load images. Note that
88-
lazy loading will only work if the slides are `img` tags or if both `slideWidth` and `slideHeight` are specified.
87+
If `false`, the carousel will render all children at mount time and will not attempt to lazy load images. Note that lazy loading will only work if the slides are `img` tags or if both `slideWidth` and `slideHeight` are specified.
8988

9089
#### imagesToPrefetch
9190
`PropTypes.number`
9291

93-
If `lazyLoad` is set to `true`, this value will be used to determine how many images to fetch at mount time. Defaults
94-
to `5`.
92+
If `lazyLoad` is set to `true`, this value will be used to determine how many images to fetch at mount time. If the slides are not simple `img` elements, this prop will have no effect. Defaults to `5`.
93+
94+
#### maxRenderedSlides
95+
`PropTypes.number`
96+
97+
If `lazyLoad` is set to `true`, this value will be used to determine how many slides to fully render (including the currently selected slide). For example, if the currently selected slide is slide `10`, and this prop is set to `5`, then slides `8-12` will be rendered, and all other slides will render a lightweight placeholder. Note that this prop is ignored for slides that are simply `img` tags - these carousels should use the `imagesToPrefetch` prop instead. Defaults to `5`.
9598

9699
#### cellPadding
97100
`PropTypes.number`

0 commit comments

Comments
 (0)