anne.script
anne.script

Reputation: 41

RecyclerListView not scrolling when inside position absolute parent? - React Native Expo

I'm working on a suggestion list which will show below the search bar. I have to put on the View the position absolute cover the RecyclerListView; however, the scroll not working at all. Here is the sample code:

<View style={{position: "absolute", top:0}}>
 <RecyclerListView
    style={{ flex: 1, minWidth: "100%", height: "100%" }}
    rowRenderer={rowRenderer}
    dataProvider={_dataProvider}
    layoutProvider={_layoutProvider}
  />
</View>

Upvotes: 0

Views: 379

Answers (1)

anne.script
anne.script

Reputation: 41

I finally found the root cause of the problem. In order for this to work, I have to move this code to the upper component where the parent has a width and height larger than the RecyclerListView width and height.

Upvotes: 1

Related Questions