Responsive column hiding #227
Replies: 2 comments 1 reply
-
I didn't choose to add mobile responsiveness built in because it can be so subjective. You can see in my prop tables source code where I change the column pinning behavior based on a media query. You should be able to do the same with the columnVisibility state + detail panel. Someone else in the discord recently mentioned they render their own custom mobile rows at a certain media query with the |
Beta Was this translation helpful? Give feedback.
-
+1 It would be good if there is an example with this kind of implementation |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Some table libraries I have worked with have responsive options or plugins to automatically hide columns on mobile/smaller screens so that there is no side scrolling, and instead display the data from the hidden columns in an expanded details panel.
I didn't see any options like this. I'm guessing it should be handled manually with useMediaQuery and conditionally adjusting hidden columns and the various props in https://www.material-react-table.com/docs/guides/detail-panel such as renderDetailPanel. Does this seem like the correct approach, or are there any other approaches you recommend?
Are there any plans to add a prop like enableResponsive or enableMobileLayout in the future?
Beta Was this translation helpful? Give feedback.
All reactions