use-carousel-hook
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -28,3 +28,4 @@ "use strict"; | ||
if ((options.direction === 'vertical' && el.scrollHeight === 0) || el.scrollWidth === 0) { | ||
return children.length - 1; | ||
setMaxIndex(children.length - 1); | ||
return; | ||
} | ||
@@ -31,0 +32,0 @@ const lastScrollableChild = children.findIndex(child => options.direction === 'vertical' |
@@ -23,3 +23,4 @@ import { useState, useRef, useEffect, useReducer, useCallback } from 'react'; | ||
if ((options.direction === 'vertical' && el.scrollHeight === 0) || el.scrollWidth === 0) { | ||
return children.length - 1; | ||
setMaxIndex(children.length - 1); | ||
return; | ||
} | ||
@@ -26,0 +27,0 @@ const lastScrollableChild = children.findIndex(child => options.direction === 'vertical' |
{ | ||
"name": "use-carousel-hook", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Adds functionality for carousels using React hooks", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
25184
515