[Tabs] unrecognized prop to DOM if child <Tab/> is wrapped
See original GitHub issueI want tabs that are right-clickable with mouse and user would have option to open in new tab. Like all normal links <a ...> ...</a>
So i add <Link/>
around <Tab/>
and it does the job but my console is full of errors on development env.
Warning: React does not recognize the
fullWidth
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasefullwidth
instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Warning: React does not recognize the
textColor
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasetextcolor
instead. If you accidentally passed it from a parent component, remove it from the DOM element.
I wonder if i could solve this somehow? 🤔
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import {Link} from 'react-router-dom';
<Tabs
value={this.state.tab}
onChange={this.handleChangeTab}
indicatorColor="primary"
centered
>
<Link className={'lnu'} to={'/user/account/update-details'}><Tab label={'Account'}/></Link>
<Link className={'lnu'} to={'/user/account/password-change'}><Tab label={'Password'}/></Link>
<Link className={'lnu'} to={'/user/account/loyalty-discount'}><Tab label={'Discount'}/></Link>
</Tabs>
Tech | Version |
---|---|
Material-UI | v3.0.0 |
React | 16.4.2 |
Browser | chrome Version 68.0.3440.106 (Official Build) (64-bit) |
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
The correct solution is documented in https://material-ui.com/guides/composition/#routing-libraries:
I’m getting the same error with
MenuItem
s in MUI 4.5.1. I’m using the component as it was suggested forTabs
: