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
A lot of tabs shows scrollbar and crashes the application #1689
Comments
I believe it's a material-ui bug. |
So I believe it's because the clientWidth can't be calculated correctly. This can be fixed by adding |
@tkvw Would you mind sharing the link to your codesandbox reproducing the issue? I couldn't do better than https://codesandbox.io/s/k3wpror8yv. |
@tkvw so is it a material-ui bug, or a react-admin bug? |
I think react-admin, what I've debugged is that the tabs container needs a fixed width container. Setting |
Fixed by #1721 |
#1721 needs to be reverted, Im reopening this one. |
I think is a materia-ui bug however I could fixed it by setting the classes passed to const styles = {
tabs: {
width: 0
}
} Used with with my Show resource component: export ResourceShow = withStyles(styles)(ResourceShowView); And in my view added that class to import { Show, TabbedShowLayout, TabbedShowLayoutTabs } from 'react-admin'
const ResourceShowView = ({ classes, ...props}) => (
<Show {...props} >
<TabbedShowLayout tabs={<TabbedShowLayoutTabs classes={{scrollable: classes.tabs}} scrollable scrollButtons={'on'}/>}>
{<YourTabs/>}
</TabbedShowLayout>
</Show>
) I don't know why this happens, but it worked! 😃 PS: Don't know nothing about crashing 😢 |
I reproduced with the latest versions (v2 + v3) and the bug is still there. |
@tkvw can you assign me this issue, if anyone is not working on it for now ? |
No news for some time, closing |
Example app: https://pp0o4x40p0.codesandbox.io/#/posts/13
I just copied the last tab a couple of times and you'll see a scrollbar at the bottom.
What I expected: that the
Tabs
component would be scrollable and the application not to crash.I think this is because the Tabs parent width is implicit instead of explicit.
The text was updated successfully, but these errors were encountered: