NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Slider within a Modal does not update live on Android

Open slewicki opened this issue 3 years ago • 8 comments

Describe the bug When creating a Slider within a Modal, the Slider.Thumb does not update when dragging in Android. Works perfectly fine in iOS.

To Reproduce

  1. Create a Modal with a Slider child
  2. Tap and drag the Slider.Thumb
  3. See Slider.Thumb not following drag motion

Expected behaviour Slider.Thumb to behave as it does on iOS where it follows along with the drag.

CodeSandBox/Snack link snack template.

Platform Android

  • NativeBase version 3.2.2
  • Device: Pixel 6/ Android Emulator
  • OS: Android 12
  • React Native version 0.63.4
  • Expo sdk version 43
  • node 16.13.1
  • yarn 1.22.11

Additional information Works as expected on iOS. Issue only effect Android

slewicki avatar Jan 05 '22 06:01 slewicki

HI @slewicki , thanks for reporting issue, we will fix it soon.

ankit-tailor avatar Jan 17 '22 09:01 ankit-tailor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 19 '22 03:03 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 25 '22 20:05 stale[bot]

There's pretty much the same problem when Slider is wrapped into Actionsheet content.

Here's a Snack example: https://snack.expo.dev/@404-html/native-base---slider-in-actionsheet

Looks like slider's thumb is not capturing drag gesture on Android and the only way to change slider's value is to tap on the track.

404-html avatar Jun 21 '22 10:06 404-html

This is a problem with PanResponder. Related bug: https://github.com/facebook/react-native/issues/14295

Something like this worked for me as a workaround:

<Slider.Thumb {...props}>
  <TouchableWithoutFeedback onPress={() => {}}>
    <Box position="absolute" top={0} bottom={0} left={0} right={0} />
  </TouchableWithoutFeedback>
</Slider.Thumb>

szymn avatar Oct 11 '22 11:10 szymn

The TouchableWithoutFeedback hack doesn't fix the actionsheet/modal problem for me, fwiw.

jasontamez avatar Nov 14 '22 03:11 jasontamez

Are there any updates to fix this issue?

bahri-dev avatar Jun 07 '23 04:06 bahri-dev

Is this Issue fixed yet ?

Etubaba avatar Jan 30 '24 10:01 Etubaba