Getting the react warning: Unknown prop 'showExpandableButton' on <div> tag when I set the showExpandableButton prop on a CardActions component.
Putting showExpandableButton in CardHeader works well for me.
<Card expandable zDepth={3}>
<CardHeader
title='Card'
subtitle='Example Card'
showExpandableButton
/>
<CardActions> ... </CardActions>
<CardText expandable> ... </CardText>
</Card>
We shouldn't be spreading the showExpandableButton property to the dom element.
We should apply the same fix from CardTitle and CardHeader to the CardAction.
When will this be fixed?
@akshaynanavati When you submit a PR? :wink:
Here ya go - https://github.com/callemall/material-ui/pull/6578
Experiencing similar issue. Here is my code below
Version: 0.18.1
render(){
return <div>
{this.state.news.map(function(news){
return <Card key={news.id}>
<CardHeader
title={news.title}
subTitle={news.company.code}
actAsExpander
showExpadableButton
/>
<CardText expandable>{news.content}</CardText>
</Card>
})}
</div>
}
Error:
Unknown props `subTitle`, `showExpadableButton` on <div> tag. Remove these props from the element.
Most helpful comment
Here ya go - https://github.com/callemall/material-ui/pull/6578