Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material UI - Remove "Rows per page" in the component TablePagination

Tags:

material-ui

How can I remove the select "Rows per page"? I don't want to use it in my project...

enter image description here

like image 808
Andrés Montoya Avatar asked Jul 19 '18 00:07

Andrés Montoya


2 Answers

Correct answer you should find in documentation. For the property rowsPerPageOptions one says:

Customizes the options of the rows per page select field. If less than two options are available, no select field will be displayed.

So you have to specify rowsPerPageOptions={[]}, that's all folks. The documentations could be found here.

like image 98
Yuriy Piskunov Avatar answered Sep 24 '22 01:09

Yuriy Piskunov


Just assign the attribute labelRowsPerPage in TablePagination tag to an empty string.

<TablePagination
  labelRowsPerPage=''
  {...otherProps}
  />
like image 33
anonymous_siva Avatar answered Sep 24 '22 01:09

anonymous_siva