Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing on Segment Tab is not working when the Segmented Control is wrapped under TapGestureHandler #886

Open
fbele opened this issue Aug 23, 2024 · 1 comment

Comments

@fbele
Copy link

fbele commented Aug 23, 2024

The tapping on control segmented button (tab) stops working when wrapped with TapGestureHandler, for example:

      <GestureHandlerRootView style={$gestureHandlerRootView}>
        <TapGestureHandler onBegan={resetInactivityTimer}>
          <View style={$gestureHandlerWrapper}>
            <SegmentedControl
                values={['Tab 1', 'Tab 2']}
                selectedIndex={selectedSegmentIndex}
                onChange={(event) => {
                  handleSegmentChange(event.nativeEvent.selectedSegmentIndex)
                }}
              />
          </View>
        </TapGestureHandler>
      </GestureHandlerRootView>

If you slide it it will still work, but that is not a nice UX.

@fbele
Copy link
Author

fbele commented Oct 11, 2024

To add to the issue, it only doesn't work on iOS when using native module. If native module is removed and the JavaScript version is used, then it's working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant