erksch / react-native-wheely

An all JavaScript wheel picker for react-native without any native code.
413 stars 59 forks source link

Dispositioned Items #32

Closed sidnetopia closed 1 year ago

sidnetopia commented 2 years ago

Hi,

Whenever I navigated to the 2nd or 3rd option, it overlaps: ezgif-5-52d9efbc96

If I also resized the height of the container e.g. containerStyle={{height: '15%'}}, it offsets the options: Screenshot 2022-07-10 164253

sidnetopia commented 2 years ago

Code for that:

<WheelPicker
  selectedIndex={selectedIndex}
  options={['1']}
  onChange={(index) => setSelectedIndex(index)}
  containerStyle={{
    position: 'relative',
    // elevation: 12,
    // borderBottomWidth: 0.5,
    height: '15%',
    // top: -50,
    // backgroundColor: '#ee1',
  }}
  // itemTextStyle={{
  //     // fontSize: 22,
  //     // justifyContent: 'center',
  //     // fontWeight: '100',
  //     top: '-20%',
  // }}
  // itemStyle={{
  //     top: -50,
  // }}
  itemHeight={40}
  selectedIndicatorStyle={{
    backgroundColor: 'rgba(0, 112, 60, 0.2)',
    width: '92%',
    alignSelf: 'center',
  }}
/>
erksch commented 1 year ago

Changing the height like that is not supported.