skip to Main Content

I normal flat list in react native and I have react native web that renders the mobile component in web

I am hiding the scrollbar with the prop showsHorizontalScrollIndicator={false},

The scrolling works fine and as expected in mobile, but in the web the scrolling is completely halted as it does not allow dragging to scroll like mobile.

  <FlatList
            horizontal={true}
            showsHorizontalScrollIndicator={false}
              renderItem={({ item }) => (
                <Button
                   .... />
            )}
            keyExtractor={(....}
            data={data} />

Is there any way to enable scroll behavior on the web like on mobile?

If not just have a scrollbar that only pops up when the section

2

Answers


  1. Instead of showsHorizontalScrollIndicator={false}

    Use overflow: hidden to the root view.

    Login or Signup to reply.
  2. In react-native-webview library there is a prop named as scrollEnabled set it to true.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search