Hi,
I have a ListView which I do not want to limit in height. With the current implementation the ListView will call onEndReached() when the last items of the list are rendered. (e.g. A calendar will keep loading one month after the other, without stopping.) I would like that the onEndReached() method is only called when the user actually scrolls down the list.
Can somebody help me with this one?
You could listen on the onScroll event and trigger a flag and ignore onEndReached events if that flag is unset
Maybe I'm doing something wrong, but the onScroll event of the ListView is never fired.
It seems to be implemented in the source
Try updating your version of react-native-web and post a snippet of your code if that doesn't help
The scroll event gets fired if I limit the height of the ListView container, but it doesn't when the ListView can grow as big as it wants to.
I think in this case I'm scrolling the window and not the ListView itself.
Yeah, that's definitely the case. If your window can scroll, then you should specify some sort of constraints on the ListView's height in order to make it function properly.
FWIW, React Native intends to deprecate ListView. The implementation here is not maintained and not something I'd recommend using unless you have no other choice at the moment.
While being marked as not supported/maintained, mentioning any alternative and/or replacement approaches would be very helpful.
BTW i am hitting same error on FlatList
Got the same error in flatlist
Most helpful comment
While being marked as not supported/maintained, mentioning any alternative and/or replacement approaches would be very helpful.
BTW i am hitting same error on
FlatList