Skip to content

Commit

Permalink
add number type to _index/_prevIndex (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-alza authored Jun 29, 2022
1 parent b2856c0 commit e4daf20
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 @@ -76,7 +76,7 @@ export const SwiperFlatList = React.forwardRef(
const [scrollEnabled, setScrollEnabled] = React.useState(!disableGesture);

const _onChangeIndex = React.useCallback(
({ index: _index, prevIndex: _prevIndex }) => {
({ index: _index, prevIndex: _prevIndex }: { index: number; prevIndex: number }) => {
if (_index !== _prevIndex) {
onChangeIndex?.({ index: _index, prevIndex: _prevIndex });
}
Expand Down

0 comments on commit e4daf20

Please sign in to comment.