callstack / callstack/react-native-pager-view

onPageSelected called automatically when navigate to other screen and detachInactiveScreens is false

Open
#488 6 comments 8 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.4k
Forks
476
Avg merge
10d 21h
Merged PRs (30d)
2

Description

## Environment

`"react": "17.0.2",`
`"react-native": "0.66.2"`
`"react-native-pager-view": "^6.0.0-rc.0"`
`"@react-navigation/native": "^6.0.6"`

## Description

disable the `detachInactiveScreens` and navigate to other screen and after came back the page is set to zero onPageSelected event is called every time when I navigate to other screen. Event is working fine when `detachInactiveScreens` is true.

Contributor guide

Open the contributing guide

Research direction

Reproduce the navigation flow with React Native 0.66.2, react-native-pager-view 6.0.0-rc.0, and detachInactiveScreens set to false. Trace the pager's onPageSelected entry point while leaving and returning to the screen, then verify that navigation does not reset the page or emit the event unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.