Skip to content

Commit

Permalink
Listen autoplay changes (#136)
Browse files Browse the repository at this point in the history
Co-authored-by: yamila-fraiman <71793326+yamila-fraiman@users.noreply.github.com>
  • Loading branch information
wilav-dev and wilav-dev authored Jun 13, 2022
1 parent 6fbdcb3 commit b2856c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SwiperFlatList/SwiperFlatList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const SwiperFlatList = React.forwardRef(
// https://upmostly.com/tutorials/settimeout-in-react-components-using-hooks
return () => clearTimeout(autoplayTimer);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentIndexes.index, _data.length]);
}, [autoplay, currentIndexes.index, _data.length]);

const _onMomentumScrollEnd: FlatListProps<unknown>['onMomentumScrollEnd'] = (event) => {
// NOTE: Method not executed when call "flatListElement?.current?.scrollToIndex"
Expand Down

0 comments on commit b2856c0

Please sign in to comment.