I am using Ag-grid in my React app, I need to trigger an action when the user reaches the 90% of the rows visibles (no matter if they made scroll or click the 'next' button). How can I know that? which event should I use?
My thoughts are that everytime that the user reaches the 90% of the rows loaded then I will trigger the defined action. Thank you very much.
EDIT:
<AgGridReact
columnDefs={this.state.columnDefs}
rowData={this.props.rowData }
ViewportChangedEvent={this.onScroll.bind(this)}
enableSorting
enableFilter
showToolPanel
pagination
paginationAutoPageSize
singleClickEdit
sizeColumnsToFit
enableColResize
onGridReady={this.onGridReady}
rowHeight={48}
onSomeEvent={some.handler}
/>
That's what I have and it's diplaying the data correctly, now I need an event onSomeEvent={some.handler}
that allow me to know which is the row that he is seeing to know when he reaches the 90% of the total rows that are loaded.