mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 09:15:33 +03:00
Fix carousel not scrolling
This commit is contained in:
parent
5e2d084854
commit
15e4012dd2
1 changed files with 1 additions and 1 deletions
|
@ -55,11 +55,11 @@ function MediaModal({
|
|||
const scrollLeft = index * carouselRef.current.clientWidth;
|
||||
const differentStatusID = prevStatusID.current !== statusID;
|
||||
if (differentStatusID) prevStatusID.current = statusID;
|
||||
carouselRef.current.focus();
|
||||
carouselRef.current.scrollTo({
|
||||
left: scrollLeft * (isRTL() ? -1 : 1),
|
||||
behavior: differentStatusID ? 'auto' : 'smooth',
|
||||
});
|
||||
carouselRef.current.focus();
|
||||
}, [index, statusID]);
|
||||
|
||||
const [showControls, setShowControls] = useState(true);
|
||||
|
|
Loading…
Reference in a new issue