I'm using an InfiniteLoader
with a Table
and I have the indices of some entries that match a specific criteria stored in state. If the user would want to go through those entries, I would have to pass down to the Table
each index (following a button click) and use it in scrollToIndex
. However, after it's passed down, I would have to make it null
again, otherwise if the user were to scroll up/down the Table
, he would always end to the same index specified by scrollToIndex
instead of the current scroll position.
Is there a better way to do that, other than setting the state twice, once with an index and then with a null
value?
Hope my question is clear.