NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

first click goes nowhere

Open Gismo1337 opened this issue 2 years ago • 8 comments

Description

If you are try to slide the input mark from right to left or left to rigt, the mark react weird. The Userexperience is not acceptable.

CodeSandbox/Snack link

Can't reproduce in Sandbox. Link is tempalte. https://codesandbox.io/s/wonderful-shockley-p8025b

Steps to reproduce

import { Slider } from "native-base";

<Slider maxW="300" defaultValue={100} minValue={100} maxValue={1000} accessibilityLabel="hello world" step={100}>
   <Slider.Track>
     <Slider.FilledTrack />
   </Slider.Track>
   <Slider.Thumb />
</Slider>
  1. Try component
  2. See error

Bottom Slider is MultiSlider @ptomasroos an work as expceted. Top Slider ist React Native Base Slider and feels buggy. weirdslider

NativeBase Version

3.3.x

Platform

  • [X] Android
  • [ ] CRA
  • [X] Expo
  • [ ] iOS
  • [ ] Next

Other Platform

Android Simulator 'scrcpy' @ Ubuntu 21.04

Additional Information

No response

Gismo1337 avatar Mar 10 '22 08:03 Gismo1337

Using step={1} the experience is acceptable, considering that the step for input that user go to use is usually 1

ezgif com-gif-maker (1)

RobertDS07 avatar Mar 10 '22 14:03 RobertDS07

Thanks. the experience is much better. But first 'touch' after rerender goes nowhere. I stay at multislider until fix.

Gismo1337 avatar Mar 11 '22 07:03 Gismo1337

I was guessing it was a problem with my emulator, cool

RobertDS07 avatar Mar 11 '22 12:03 RobertDS07

I tested it live on my device. First click goes nowhere.

Gismo1337 avatar Mar 11 '22 15:03 Gismo1337

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]

@Gismo1337 maybe you can change issue title to the real issue: first click goes nowhere

RobertDS07 avatar May 26 '22 14:05 RobertDS07

I ran into this issue as well. Even with changing the first click issue having to specify the step prop to get the slider to approach normal functionality is strange and should probably at least be documented.

tonyneel avatar Jul 09 '22 21:07 tonyneel

Hi @Gismo1337, When you pass the value maxValue={1000} and steps={100}. it forces the slider to increase its length by 10% each time you slide. If you want a smooth transition don't pass the steps prop it will adjust to your cursor. Also, I was unable to reproduce the first-click issue. please try it with the latest version.

Viraj-10 avatar Sep 19 '22 17:09 Viraj-10