Closed Rc85 closed 12 months ago
Hey any soln ?
Nope. Need to reconsider your implementation or just let the error happen if it doesn't interfere with UI/UX.
I got the same error when Flatlist
nested under VirtualizedList
.
RN: 0.69.6
A.tsx
function ComponentA = () => {
return <VirtualizedList ... />
}
B.tsx
function ComponentB = () => {
const ref = useRef<FlatList>(null)
useEffect(() => {
// got 'No scrollTo method provided' warning here
ref.current?.scrollToOffset({ offset: 100, animated: false })
}, [])
return (
<View>
<FlatList ref={ref} ... />
</View>
)
}
Any updates on this?
I have this warning when calling scrollToEnd()
method in nested FlatList.
React native 0.71.1, React 18.2.0
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Description
Cannot programmatically scroll nested
SectionList
insideSectionList
.What I'm trying to accomplish is a horizontal bar with categories that will be stickied to the top of the screen, this requires a
SectionList
. Below it is anotherSectionList
and for this, I render it insiderenderItem
. If I press on a category in the horizontal bar, it should scroll the nestedSectionList
so that the category will be view.I've tried many different implementations, such as wrapping the nested
SectionList
with a horizontalScrollView
.Version
0.70.2
Output of
npx react-native info
Steps to reproduce
See snack
Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/yMDRoSATG
Click on tab 1 will show warning in the log and will not scroll to the last section.