material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Table extending longer than it should

Open jakeleventhal opened this issue 8 years ago • 6 comments

Describe the bug When the table is showing N rows but there are <N rows of data, the there is still space for N rows. For example, in the pagination if you say to show 20 rows at a time, but there are only 2 rows of data, the table extends and is very long and just shows blank white space.

To Reproduce Steps to reproduce the behavior:

  1. Make a table
  2. Select to show 20 rows when only 3 rows of data are present

Expected behavior The table should conform to the number of rows that are present in the table and should show some indication that there is no data when there is none ("No Data" or something like that).

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome

jakeleventhal avatar Nov 15 '18 06:11 jakeleventhal

@mbrn This is the same issue I am facing too. Could you please check on this.

SilviaJoyceBalraj avatar Nov 29 '18 21:11 SilviaJoyceBalraj

@SilviaJoyceBalraj , I am very busy nowadays. But 3 developers are working on some issues. So we will resolve this too, asap.

mbrn avatar Nov 30 '18 06:11 mbrn

This is done @jakeleventhal, @SilviaJoyceBalraj,

I added a emptyRowsWhenPaging options to prevent render empty data rows.

It will be in next release.

mbrn avatar Dec 10 '18 12:12 mbrn

Do we want to default this behavior to false?

jakeleventhal avatar Dec 14 '18 05:12 jakeleventhal

There are many users @jakeleventhal. So we cant change it as default. You can hoc component

mbrn avatar Dec 14 '18 11:12 mbrn

In the next major release can it be changed to false with a breaking change note?

eddiemonge avatar Jul 11 '19 00:07 eddiemonge