-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(number prop on dots): number prop on dots works when thumbnails a… #124
Conversation
…re supplied. If the number isnt supplied then the length of thumbnails are considered
@@ -27,20 +27,26 @@ export default class CarouselDots extends Component { | |||
|
|||
renderCarouselDots() { | |||
if (this.props.thumbnails) { | |||
return this.props.thumbnails.map((thumbnail, index) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be done simpler:
const dotsLength = isNaN(this.props.number) ? this.props.thumbnails.length : this.props.number;
return this.props.thumbnails.slice(0, dotsLength).map((thumbnail, index) => (
Thanks @udaypydi @Lukasz-pluszczewski what do you think about this PR? |
you have conflicts now |
Am I correct that these changes were already merged as apart of #126 ? |
could you reply? |
Yeah these changes are already merged in other PR. |
thanks @udaypydi so I'm closing this PR |
…re supplied. If the number isnt supplied then the length of thumbnails are considered
package.json:version
has been updated withnpm version patch
(ormajor/minor
as appropriate)@brainhubeu/react-carousel
version has been updated indocs-www/package.json
to the same which is inpackage.json:version