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

Material Table is not responsive

Open kkateli opened this issue 7 years ago • 35 comments

Material Table is not responsive. It only reduces the width of the table when shrinking a page. A lot of other table libraries create "stacked" table in mobile view (e.g. https://github.com/gregnb/mui-datatables). Is it possible to have this stacked table view in the near future? I reckon It would be nice to swap the table to Material UI list in mobile view.

Taken from:MUI datatables

Screen Shot 2019-11-28 at 2 38 21 PM

kkateli avatar Nov 28 '19 01:11 kkateli

Any visibility on this whether this is going to be implemented in the library sooner or later?

abhishekgupta92 avatar Dec 29 '19 05:12 abhishekgupta92

What to do here... I don't see this lib having it's own responsive solution. I mean what would it look like? It would depend on the very instance of the table that needs to be rendered on a small screen. User preferences would undoubtedly cause all kinds of issues.

The only reasonable solution I can see is to implement horizontal scroll at some min width similar to material-ui table.

I like @kkateli idea of using a material-ui list to display an alternate view. Probably can do this pretty easily, but with significant drop in usability. e.g. sorting. Search might not be too bad. And list can be virtualized with react window

Anyway I think rolling your own mobile display is the better solution, with horizontal scroll being a best solution for this library.

JeffEmery avatar Apr 14 '20 05:04 JeffEmery

Horizontal scroll is apparently the default behavior already. I'll have to see why it's not scrolling on my table.

JeffEmery avatar Apr 14 '20 05:04 JeffEmery

@JeffEmery Mine is not horizontal scrolling either. Did you figure out what was disabling it?

hatchli avatar Apr 19 '20 07:04 hatchli

@JeffEmery @hatchli Mine was not scrolling because the table was under a display: flex way up in the DOM tree of my layout. For me, horizontal scrolling only worked under a display: block

I wonder if it's possible to still make it horizontal scrollable with display: flex, that would be good because I had to do some undesired chages to my page layout because of the display: block

LuanScudeler avatar Apr 29 '20 21:04 LuanScudeler

@hatchli I think I had the same issue as @LuanScudeler . Once I dismantled all the containers above the table, the horizontal scroll began working. I didn't narrow it down to display: flex like @LuanScudeler but I highly suspect that was the same issue.

JeffEmery avatar Apr 30 '20 04:04 JeffEmery

Is there any progress on this issue? horizontal scrolling is really ugly on mobile and I really like material-table and don't want to switch.

a-tonchev avatar Jul 17 '20 09:07 a-tonchev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Oct 15 '20 09:10 stale[bot]

Bump

influentcoder avatar Oct 19 '20 01:10 influentcoder

any updates? @mbrn any plans to implement this?

anmolmalik97 avatar Nov 06 '20 11:11 anmolmalik97

What to do here... I don't see this lib having it's own responsive solution. I mean what would it look like? It would depend on the very instance of the table that needs to be rendered on a small screen. User preferences would undoubtedly cause all kinds of issues.

Check out mui-datatables. They handle responsiveness very well! Would love to see something similar implemented in this library.

JeremyEnglert avatar Nov 12 '20 08:11 JeremyEnglert

I'm also having this same issues. Changing tables at this point is less than desirable though :D

hutber avatar Jan 05 '21 00:01 hutber

no updates?

gatz2 avatar Mar 09 '21 02:03 gatz2

Material Table is not responsive. It only reduces the width of the table when shrinking a page. A lot of other table libraries create "stacked" table in mobile view (e.g. https://github.com/gregnb/mui-datatables). Is it possible to have this stacked table view in the near future? I reckon It would be nice to swap the table to Material UI list in mobile view.

Taken from:MUI datatables

Screen Shot 2019-11-28 at 2 38 21 PM

Yes!! this would be so much better & helpful! I support the stack implementation for mobile view

prempro42 avatar Mar 10 '21 14:03 prempro42

Still no update I guess

ravieway avatar Mar 16 '21 15:03 ravieway

Any update?

gbdav2 avatar Apr 28 '21 17:04 gbdav2

btechn01 avatar May 21 '21 10:05 btechn01

any update?

kadirtereci avatar May 27 '21 14:05 kadirtereci

Updates?

BugraTuncer avatar May 27 '21 14:05 BugraTuncer

Updates?

still no update...

kadirtereci avatar May 27 '21 14:05 kadirtereci