jeanregisser / react-native-slider

A pure JavaScript <Slider> component for react-native
MIT License
1.3k stars 571 forks source link

Slider has minimumTrackTintColor sticking out on left side #154

Closed JosephMulder closed 5 years ago

JosephMulder commented 5 years ago

I get this ui problem where I can see the minimumTrackTintColor sticking out on left side when the value is 0. My slider is going to be default at 0 so to have it doing this looks really bad. "react": "16.6.3", "react-native": "0.58.4", "react-native-slider": "^0.11.0"

Made a clean repository with most basic code and I get the problem in the picture. Not sure if there is something that can fix this problem.

  <View style={{flex: 1}}>
        <View style={{padding: 30, backgroundColor: '#cccccc'}}>
                <Slider
                  style={{width: '100%'}}
                  value={this.state.value}
                  onValueChange={value => this.setState({ value })}
                  minimumValue={0}
                  maximumValue={10}
                  thumbStyle={{width: 60, height: 60, borderRadius: 30}}
                  trackStyle={{width: '100%', height: 60, borderRadius: 30, backgroundColor: '#BA2745'}}
                  minimumTrackTintColor='green'
                  onSlidingComplete={ val => console.log('hi')}
                />
        </View>
  </View>

screenshot_1549896305

Fredsters commented 5 years ago

Maybe do minimumTrackTintColor='transparent'