[英]Material-UI : tab not responsive with a datatable inside
I use the Simple Tabs from Material-UI and I have one Tab how contain a Datatable ( React-Data_Table ) and this tab is not responsive like other when the table is full我使用 Material-UI 中的简单选项卡,并且我有一个选项卡如何包含数据表( React-Data_Table ),并且当表已满时,此选项卡不像其他选项卡那样响应
The code编码
<Grid item xs={12}>
<Paper className={classes.paper}>
<AppBar position="static" className={classes.appBar}>
<Tabs value={value} onChange={handleChange} classes={{ indicator: classes.indicator }} variant="fullWidth">
<Tab label="Tableau" {...a11yProps(0)} />
<Tab label="Graphique" {...a11yProps(1)} />
<Tab label="Carte" {...a11yProps(2)} />
</Tabs>
</AppBar>
<TabPanel value={value} index={0}>
<Table sections={props.sections}/>
</TabPanel>
<TabPanel value={value} index={1}>
<Graph />
</TabPanel>
<TabPanel value={value} index={2}>
<AppMap />
</TabPanel>
</Paper>
</Grid>
I don't know how to fix this except maybe make a CSS to change width
with size screen我不知道如何解决这个问题,除了可能制作一个 CSS 来改变屏幕尺寸的
width
Thanks for the help谢谢您的帮助
If the child element is exceeding it's parent's size(container element) I would recommend to try using max-width to ensure the width doesn't pass a certain limit.如果子元素超出其父元素的大小(容器元素),我建议尝试使用 max-width 以确保宽度不会超过某个限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.