6.7.6
https://react-table.js.org/#/story/simple-table
Set the page size to 100.
Go to page 56.
See a bunch of blank rows rendered after the content finishes.
It's supposed to do that.
It renders blank rows when the number of rows is not enough to fill the page.
There's even a component you can override to render something for the blank rows that suits you.....
PadRowComponent: () => <span> </span>, // the content rendered inside of a padding row
It renders blank rows when the number of rows is not enough to fill the page.
I know, hence the bug report. Why was this design decision made? It seems like the default option should be the opposite.
I found minRows={0} after scouring the docs and other bug reports, but I'm not sure that is being used correctly.
It is not a "bug" because the owner decided to make it work that way to the paging control does not move from under the users mouse when they hit the last page.
It was one of the features of the product that made me choose it in the first place. For a paged solution (especially with a lot o pages), you don't want to make the user have to move the mouse vertically to get to the "previous" button (because after having paged forward, the have a mental picture of where the previous button is - even if they don't realise it)
minRows can be used in the manner you are describing. The only issue is if there are NO records in the table at all as the default "no data" message is a floating div and will display over the header and footer. However, you can set that to a sensible minimum like 3 but that does mean if there is only 1 row on the last page that 2 padding rows will appear.
Most helpful comment
I know, hence the bug report. Why was this design decision made? It seems like the default option should be the opposite.
I found
minRows={0}after scouring the docs and other bug reports, but I'm not sure that is being used correctly.