[Table] Responsive option
See original GitHub issueI notice there is currently no option to make the table “responsive” like in Bootstrap. I think it would be a good addition since this framework is also used a lot on mobile devices.
I’d just add a responsive
prop like this:
<Table responsive>
And the code behind is basically this style code applyed to the <Table>
element.
const styles = theme => ({
table: {
display: 'block',
width: '100%',
overflowX: 'auto',
},
});
What do you think?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:20
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Tables - Bootstrap
Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a .table with .table-responsive...
Read more >Responsive - DataTables
Responsive is an extension for DataTables that resolves that problem by optimising the table's layout for different screen sizes through the dynamic insertion ......
Read more >Responsive Data Tables | CSS-Tricks
Responsive design is all about adjusting designs to accommodate screens of different sizes.
Read more >Mobile visibility & responsive options - Posts Table Pro
The responsive_display option determines how the “child rows” are displayed when viewing the table on smaller screen sizes (or when there is too...
Read more >Make your Data Table Responsive - Supsystic
Data Tables Generator by Supsystic automatically creates responsive tables. You don't need to activate any options, it will be responsive by default.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can think of 2 solutions to this problem, what do you guys prefer?
responsive
prop to the Table component, That can be used like this:TableResponsive
component that can be used like this:I have a preference for option 1.
I could find the following for benchmark:
As a workaround, it’s relatively easy to wrap the table in a div:
YMMV based on parent hierarchy, but I’ve had good luck with this approach inside of a
Grid
component.