Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable and hide the pagination footer for react-table?

I'm new to react-table. Currently I have a 5 rows table to render on react-table, and I don't need the pagination function. I understand to turn pagination off, it can be done by "pagination={false}". However the pagination control still showing, is there a way to hide it?

like image 611
user3547219 Avatar asked May 09 '19 04:05

user3547219


2 Answers

I just found prop showPagination={false}. Try that.

https://github.com/tannerlinsley/react-table/tree/v6#props

like image 63
simPod Avatar answered Oct 19 '22 15:10

simPod


you can add props like this in ReactTable

showPaginationBottom={false}

you can also decide to show pagination on basis of data rows length

showPaginationBottom={data.length > 10 ? true: false}
like image 40
Sanoodia Avatar answered Oct 19 '22 15:10

Sanoodia