Closed ahmehri closed 6 years ago
This is a duplicate of #273. I ended up invoking onInfiniteLoad
manually in this edge case as suggested, but this still a workaround and an appropriate fix should be implemented IMHO.
hi @ahmehri , how do you invoking onInfiniteLoad manually in this edge case
?
https://github.com/seatgeek/react-infinite/blob/28adb88abd5a8c3aa05de7dba030e3e2f102d725/src/react-infinite.jsx#L284
In my case, the above condition will evaluates to
false
which will prevent the invocation ofonInfiniteLoad
. This happens becausethis.state.numberOfChildren
andprevState.numberOfChildren
both evaluates to0
and it makes sense in my use case, but what doesn't is thatonInfiniteLoad
is not invoked.I tried to solve this the following way:
but I got an
Uncaught RangeError: Maximum call stack size exceeded
error.Any idea on how to solve this issue?