[英]Material-UI : tab not responsive with a datatable inside
我使用 Material-UI 中的簡單選項卡,並且我有一個選項卡如何包含數據表( React-Data_Table ),並且當表已滿時,此選項卡不像其他選項卡那樣響應
編碼
<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>
我不知道如何解決這個問題,除了可能制作一個 CSS 來改變屏幕尺寸的width
謝謝您的幫助
如果子元素超出其父元素的大小(容器元素),我建議嘗試使用 max-width 以確保寬度不會超過某個限制。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.