How can I detect the current item is active in recyclerlistview (visible on screen)?
Please check the onVisibleIndexesChanged callback. It gives you all, now, notNow all that you might need. Close if that's what you were looking for.
Thanks for quick reply!
Can you please provide sample code for that?
I got that with:
<RecyclerListView onVisibleIndexesChanged={this.visibleLog.bind(this)} layoutProvider={this._layoutProvider} dataProvider={this.state.dataProvider} rowRenderer={this._rowRenderer} />
How can I get all, now, notNow?
thanks for your awesome library
You method should be visibleLog(all, now, notNow) RLV will call it with right params (those are arrays btw). After having the right indexes you can do whatever you want. If you want data fetch from your DataProvider using the given indexes.
Kindly please tell me how can I update the items viewable to screen
like changing text to "shown" while viewing
You need to update the data using those indexes and re-render. RLV will/cannot give you direct references.
Can you explain more about
using those indexes and re-render.
I couldn't find any document for re-render them
That is normal react-redux stuff. You fire an action which ultimately modifies the state.
Most helpful comment
You method should be
visibleLog(all, now, notNow)RLV will call it with right params (those are arrays btw). After having the right indexes you can do whatever you want. If you want data fetch from yourDataProviderusing the given indexes.