erksch / react-native-wheely

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

Scroll Not Working #44

Open jasonmcaffee opened 2 years ago

jasonmcaffee commented 2 years ago

When using the code provided in the readme, nothing happens when I attempt to scroll.

The list renders as expected, but nothing happens on press image

const [selectedIndex, setSelectedIndex] = useState(0);
...
<WheelPicker
                selectedIndex={selectedIndex}
                options={['Berlin', 'London', 'Amsterdam']}
                onChange={(index) => setSelectedIndex(index)}
            />
"dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.2.0",
    "@fortawesome/free-brands-svg-icons": "^6.2.0",
    "@fortawesome/free-regular-svg-icons": "^6.2.0",
    "@fortawesome/free-solid-svg-icons": "^6.2.0",
    "@fortawesome/react-native-fontawesome": "^0.3.0",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.1",
    "node-sass": "^7.0.3",
    "react": "18.1.0",
    "react-native": "0.70.4",
    "react-native-fs": "^2.20.0",
    "react-native-gesture-handler": "^2.8.0",
    "react-native-safe-area-context": "^4.4.1",
    "react-native-sass-transformer": "^2.0.0",
    "react-native-screens": "^3.18.2",
    "react-native-sound": "^0.11.2",
    "react-native-star-rating-widget": "^1.3.1",
    "react-native-svg": "^13.5.0",
    "react-native-track-player": "^3.2.0",
    "react-native-wheely": "^0.6.0"
  },
erksch commented 2 years ago

Do you use the WheelPicker within a ScrollView or component that uses a ScrollView internally?

emami7495 commented 1 year ago

Do you use the WheelPicker within a ScrollView or component that uses a ScrollView internally?

Hi, i have same issue i want to use WheelPicker in ScrollView but not work, how can i fix it?

tsheaff commented 1 year ago

I'm having the same issue. @jasonmcaffee did you find a solution? @erksch are you saying it should NOT be inside a scroll view? For me it's not inside a scrollview but no touches work.

jasonmcaffee commented 1 year ago

No, sorry, ended up just using a dropdown

erksch commented 1 year ago

@tsheaff The picker does not work within a ScrollView. Can you share a reproducer for your specific problem?

tuantvk commented 1 year ago

@jasonmcaffee @emami7495 @tsheaff it's work for on android

import React from 'react'
import { View, Text } from 'react-native'
import WheelPicker from 'react-native-wheely'; // v0.6.0

const App = () => {
  return (
    <View style={{ flex: 1 }}>
      <ScrollView>
        <WheelPicker
          flatListProps={{ nestedScrollEnabled: true }} // add line
        />
        <Text>Something here</Text>
      </ScrollView>
    </View>
  )
}

export default App
minisk93 commented 1 year ago

No solution for this? Just showing list and scroll is freezed

minisk93 commented 1 year ago

Actually by some reason scrolling didn't work within a react-native Modal component

minisk93 commented 1 year ago

Actually by some reason scrolling didn't work within a react-native Modal component

Okay, I found the problem - its a Pressable component. When WheelPicker is inside of it, it's not responsive. Maybe some props may change it, but not sure about it

minisk93 commented 1 year ago

Inside react-native-bottomsheet scroll won't work as well

bmitioglov commented 1 year ago

scroll doesn't work inside modal :(

omercandemir commented 1 year ago

Inside react-native-bottomsheet scroll won't work as well

Same issue, is there any solution?

Donghyun-git commented 11 months ago

I have Same issue, no props about this issue in d.ts...

mydesweb commented 11 months ago

set enableContentPanningGesture to false