mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
made swiper call slideTo(0) with timeout
This commit is contained in:
parent
f014e0b51e
commit
470e174547
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ const NodeImageSwiperBlock: FC<IProps> = ({ node }) => {
|
||||||
const resetSwiper = useCallback(() => {
|
const resetSwiper = useCallback(() => {
|
||||||
if (!controlledSwiper) return;
|
if (!controlledSwiper) return;
|
||||||
controlledSwiper.slideTo(0, 0);
|
controlledSwiper.slideTo(0, 0);
|
||||||
|
setTimeout(() => controlledSwiper.slideTo(0, 0), 300);
|
||||||
}, [controlledSwiper]);
|
}, [controlledSwiper]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue