React-table: Hide empty rows.

Created on 27 Sep 2017  路  6Comments  路  Source: tannerlinsley/react-table

include react table.
give some data. minimum pages should be 2 pages of data.
suppose records in data are 15.
pageSizeOptions=[10].
now in second page only 5 rows will show the data. remaining empty rows should not be rendered. they should be hidden and tables height should be reduced to fit only rendered rows.

Most helpful comment

minRows = {0}
This is a solution

All 6 comments

empty rows

this is how it looks. i want to hide those empty rows

minRows = {0}
This is a solution

Thanks @afoliveira it works

This seems like a bad default to me. I would think minRows={0} would be the default.

The idea behind a paginated table is to keep the UI predictable. Pagination buttons should not jump around. That is why the default minRows is set to the pageSize. Of course, you can change this if you don't like that, and that's the beauty of it!

use emptyRowsWhenPaging: false, in options

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pasichnyk picture pasichnyk  路  3Comments

ocalde picture ocalde  路  3Comments

Abdul-Hameed001 picture Abdul-Hameed001  路  3Comments

dwjft picture dwjft  路  3Comments

panfiva picture panfiva  路  3Comments