Material-ui: [Card] Unknown prop `showExpandableButton` on <div> tag. Cause by CardActions component

Created on 28 Mar 2017  路  6Comments  路  Source: mui-org/material-ui

Problem description

Getting the react warning: Unknown prop 'showExpandableButton' on <div> tag when I set the showExpandableButton prop on a CardActions component.

Versions

  • Material-UI: 0.17.1
  • React: 15.4
  • Browser: Chrome 57
bug 馃悰 Card

Most helpful comment

All 6 comments

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:

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

activatedgeek picture activatedgeek  路  3Comments

revskill10 picture revskill10  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

ericraffin picture ericraffin  路  3Comments

finaiized picture finaiized  路  3Comments