react-native-optimized-flatlist icon indicating copy to clipboard operation
react-native-optimized-flatlist copied to clipboard

Access FlatList methods

Open danielreuterwall opened this issue 8 years ago • 2 comments

Hey,

I've experienced a great performance boots and improved stability on Android using the OptimizedFlatList, on iOS thought FlatList works perfectly.

One limitation of the OptimizedFlatList though is access to methods on the underlying FlatList, in my case I need to access scrollToOffset. The ref to the OptimizedFlatList doesn't expose the methods of the FlatList.

Would be great to have to be able to use it as a true drop-in replacement/optimization of the FlatList.

danielreuterwall avatar Jul 19 '17 08:07 danielreuterwall

I've exposed scrollToOffset in a fork and it works fine. Should we expose all methods from FlatList just like FlatList exposes most of them from VirtualizedList? Not sure if some of them might be unavailable due to the optimization. What do you say @stoffern? I could make a PR.

danielreuterwall avatar Jul 19 '17 08:07 danielreuterwall

@danielreuterwall great to hear that you are experiencing better performance, as this is the meaning 😉 access to functions should not be a problem, the optimization should still work fine.

Please make a PR when you have the time 😉

st0ffern avatar Dec 12 '17 07:12 st0ffern