React-table: Hide number row selection dropdown

Created on 27 Oct 2018  路  2Comments  路  Source: tannerlinsley/react-table

Hello,

How i can hide dropdown which is used to select number of rows to display in the table.

image

Most helpful comment

showPageSizeOptions: false

All 2 comments

If you are just trying to remove the pagination from the bottom then you need to disable the pagination for the table.

<ReactTable
  data={data}
  columns={columns}
  showPagination={false}
/>

If you want pagination but dont want the row selection then your left with two options.

  1. Either pass in a custom component for pagination
<ReactTable
  data={data}
  columns={columns}
  PaginationComponent={CustomPagination}
/>

function CustomPagination () {
 // look at docs for how to build custom component
  return false
}
  1. You can just set the amount of rows manually and hide the row selection with CSS.
<ReactTable
  data={data}
  columns={columns}
  defaultPageSize={20}
/>
.-pageSizeOptions {
 display: none;
}

showPageSizeOptions: false

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mellis481 picture mellis481  路  3Comments

mlajszczak picture mlajszczak  路  3Comments

kieronsutton00 picture kieronsutton00  路  3Comments

panfiva picture panfiva  路  3Comments

dilipsundarraj1 picture dilipsundarraj1  路  3Comments