react-responsive-carousel
Advanced tools
Comparing version 3.1.52 to 3.1.54
@@ -10,4 +10,12 @@ # Changelog | ||
## [Unreleased](https://github.com/leandrowd/react-responsive-carousel/compare/v3.1.51...HEAD) | ||
## [Unreleased](https://github.com/leandrowd/react-responsive-carousel/compare/v3.1.52...HEAD) | ||
## [v3.1.52](https://github.com/leandrowd/react-responsive-carousel/compare/v3.1.51...v3.1.52) - 2020-04-05 | ||
### Commits | ||
- Install prettier to avoid different formatting in contributions [`4410775`](https://github.com/leandrowd/react-responsive-carousel/commit/44107757061bb962f92085f3086c525062262075) | ||
- Apply formatting on remaining files for consistency: [`ff9966b`](https://github.com/leandrowd/react-responsive-carousel/commit/ff9966b27710aa6397e76588b64747c92228f68f) | ||
- Define a pre-commit hook to run prettier [`0bb46f2`](https://github.com/leandrowd/react-responsive-carousel/commit/0bb46f259affbdbe936d741c30f5f71e5a69a5fa) | ||
## [v3.1.51](https://github.com/leandrowd/react-responsive-carousel/compare/v3.1.50...v3.1.51) - 2019-10-23 | ||
@@ -14,0 +22,0 @@ |
@@ -124,3 +124,15 @@ 'use strict'; | ||
_this.isFocusWithinTheCarousel = function () { | ||
if (document.activeElement === _this.carouselWrapperRef || _this.carouselWrapperRef.contains(document.activeElement)) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
_this.navigateWithKeyboard = function (e) { | ||
if (!_this.isFocusWithinTheCarousel()) { | ||
return; | ||
} | ||
var axis = _this.props.axis; | ||
@@ -730,3 +742,3 @@ | ||
'div', | ||
{ className: this.props.className, ref: this.setCarouselWrapperRef }, | ||
{ className: this.props.className, ref: this.setCarouselWrapperRef, tabIndex: '0' }, | ||
_react2.default.createElement( | ||
@@ -733,0 +745,0 @@ 'div', |
@@ -141,7 +141,7 @@ 'use strict'; | ||
if (images.filter(function (image) { | ||
return image !== null; | ||
return image; | ||
}).length === 0) { | ||
console.warn('No images found! Can\'t build the thumb list without images. If you don\'t need thumbs, set showThumbs={false} in the Carousel. Note that it\'s not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md'); | ||
return null; | ||
return []; | ||
} | ||
@@ -315,3 +315,3 @@ | ||
this.updateSizes = function () { | ||
if (!_this3.props.children || !_this3.itemsWrapperRef) { | ||
if (!_this3.props.children || !_this3.itemsWrapperRef || _this3.state.images.length === 0) { | ||
return; | ||
@@ -318,0 +318,0 @@ } |
{ | ||
"name": "react-responsive-carousel", | ||
"version": "3.1.52", | ||
"version": "3.1.54", | ||
"description": "React Responsive Carousel", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
974392
1676