callstack / callstack/react-native-pager-view
How I make flatlist with pagerview ?
- Dominant language
- TypeScript
- Stars
- 3.4k
- Forks
- 476
- Avg merge
- 10d 21h
- Merged PRs (30d)
- 2
Description
Hello,
I want a flatlist with header with pagerview but I got this error:
`[Encountered an error while measuring a list's offset from its containing VirtualizedList](https://stackoverflow.com/questions/72178734/encountered-an-error-while-measuring-a-lists-offset-from-its-containing-virtual)`
Code:
```
const renderInnerLists = ({ index }) => {
return (
//the pagerview grows to the height of its content, but it is nested inside of the flat list, and it does not cause the flat list to grow.
i + Math.random(1000).toString()}
numColumns={2}
listKey={(item, index) => 'D' + index.toString() + Math.random(1000).toString()}
contentContainerStyle={
s.myGalsContentStyle
}
showsVerticalScrollIndicator={false}
scrollEnabled={false}
/>
i + Math.random(1000).toString()}
listKey={(item, index) => 'S' + index.toString() + Math.random(1000).toString()}
numColumns={2}
contentContainerStyle={
s.myGalsContentStyle
}
showsVerticalScrollIndicator={false}
scrollEnabled={false}
/>
)
}
return (
item.id + Math.random(1000).toString()}
/>
)
```
Contributor guide
Assessment
This issue has not been assessed yet.