uptick / react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.
MIT License
301 stars 144 forks source link

Pagination on folderRenderer property ? #118

Open flavienbwk opened 4 years ago

flavienbwk commented 4 years ago

Hello,

I would like to be able to paginate the directories I transmit to my React Keyed File Browser component. Is this component able to handle pagination ?

Thanks

klm-lab commented 4 years ago

HI @flavienbwk

I don't think they have that yet.

You can simply fetch the paginate data form server and update the state, files: []when changing page, Get the paginate data with some extras meta data such as total, prevPage, nextpage .... and do the tricks.

flavienbwk commented 4 years ago

Thanks I wanted to avoid that to keep the search functionality.

flavienbwk commented 4 years ago

If only the folderRenderer prop would return an iteration number in addition to the folder as a callback argument, this library might be used to perform pagination.

klm-lab commented 4 years ago

Okay, I see. You're right, I hope they add it soon.