-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Table] add Responsive table option #9268
Conversation
@Skaronator This seems to have a problem at narrower widths: However the existing implementation already works as expected, without the additional prop: |
@mbrookes Fixed. Was only in the demo though. |
Then it seems like that should be the default. I can't imagine a valid use-case for having the content overflow the container. |
Thats because the Demo Frame is using
Yes it should be always responsive IMO . The weird thing is Bootstrap 4 now has responsive classes for each view breakpoint. As you can see here they now have Just checked the github repo from bootstrap and looks like @pat270 added it via twbs/bootstrap#22804 |
Yes, that's what I was suggesting should be the default.
I'm not clear on what happens there when above the breakpoint size at which For the purpose of this PR, I'd suggest making |
No clue. I think it just overflow and break the whole layout. Pretty ridiculous if you ask me. I've updated the PR. All tables are now responsive. |
Mh the I'll check this later. |
Hope so. Got some weird errors on this machine when running the tests.
src/Table/Table.js
Outdated
<ComponentProp className={classes.table} {...other}> | ||
{children} | ||
</ComponentProp> | ||
<div className={divWrapper} {...other}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still hate this. Maybe I should move the classNameProp
variable and {...other}
props back to <ComponentProp>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't appreciated the need for adding a wrapper. It explains why it was part of the demo, not the default behavior. We have other components that similarly require a suitably formatted container, such as GridList.
It seems right that <Table>
should create a <table>
.
Can we return to the beginning? What were you trying to achieve that the current Table doesn't already do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we return to the beginning? What were you trying to achieve that the current Table doesn't already do?
The current table overflows by default which is kinda bad since this is a mobile optimized framework. So I requested a responsive table option in #9221 familar to the bootstrap responsive-table thing.
I made a PR for it and then you said, that tables should be always responsive since there is no reason not to have a responsive table at all, which is true.
Responsive isn't really the right word for it, rather not overflowing its container. I should have looked more closely at what component the style was applied to I didn't anticipate you having to move the container into the component. Unfortunately the current solution introduces some new issues, so while I appreciate your efforts, it may be best to leave things as they are. If you wanted to make that more explicit in the docs by mentioning that the container needs to have |
Skarantor, thanks for your efforts, but I"m closing this for now. |
Closes: #9221