-
Notifications
You must be signed in to change notification settings - Fork 430
Closed
Description
Hello,
I have trouble understanding how the pagination works.
I work with firebase and to avoid many useless reads, I want to implement custom "page change".
I have a counter (at the time of my example : 39) in my database, that i collect, telling me how many docs I have, and i go through them 20 by 20 on each page (supposedly) instead of loading the whole firebase collection and let the table do the pagination itself.
Here is the screen of my react dev tools
Here is my code :
let options = {
totalSize: nbCandidates,
showTotal: true,
};
console.log(typeof nbCandidates);
console.log(options);
console.log(paginationFactory(options));
if(candidates){
return (<BootstrapTable keyField='cid'
data={candidates}
columns={columns}
pagination={paginationFactory({...options})}/>);
}
The thing is : if in the options, i change totalSize: nbCandidates
to totalSize: 39
I will have 4 pages in my list (which is ok, because there is 10 rows per pages, 39 rows total.
output of console.log(typeof nbCandidates);
is "number"
Metadata
Metadata
Assignees
Labels
No labels