question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Failed prop type: Invalid prop `actions[0]` supplied to `MaterialTable`.

See original GitHub issue

This error shows up in the console. I have tried to remove each singular line inside of the ‘actions’ but the error only goes away if I remove ‘actions’ itself or everything inside.

This is my ‘actions’ code: actions={[ { icon: Print, tooltip: 'Print', onClick: (event, rowData) => { this.setState({ rowData }) this.handleClickOpen() }, } ]}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
mbrncommented, Jun 14, 2019

Try this

icon: () => <Edit/>

1reaction
ahmedbrandvercommented, Jul 10, 2019

I am having same error in Material Table using this

actions={[
                  {
                    icon: "add",
                    isFreeAction: true,
                    onClick: undefined
                  }
                ]}
                components={{
                  Action: props => <NewBin refetch={this.requireRefetch} />
                }}

and this

actions={[
                  {
                    icon: () => <NewBin refetch={this.requireRefetch} />,
                    isFreeAction: true,
                    onClick: undefined
                  }
                ]}

Issued solved. If any one get this error you can try this

actions={[
                  {
                    icon: "add",
                    isFreeAction: true,
                    onClick: () => {}
                  }
                ]}
                components={{
                  Action: props => <NewBin refetch={this.requireRefetch} />
                }}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid prop actions[0] supplied to MaterialTable and fontSize ...
Warning : Failed prop type: Invalid prop actions[0] supplied to MaterialTable . Can't pass fontSize props when using string icon. To Reproduce
Read more >
Invalid prop `data` supplied to `MaterialTable`, expected one ...
The api is http://localhost:8080/api/agreements and I am trying to display the data in a react material table but I am getting this error...
Read more >
material-table/Lobby - Gitter
Warning : Failed prop type: Invalid prop data supplied to MaterialTable. in MaterialTable in Unknown (created by WithStyles(Component)) in WithStyles(Component) ...
Read more >
Warning: Failed prop type: Invalid prop `actions[0]` supplied to ...
Describe the bug. The following appears in the console: Warning: Failed prop type: Invalid prop actions[0] supplied to MaterialTable .
Read more >
material-table
material-table. React data table component that is based on material-ui. Get Started. GitHub stars. Actions. You can add one or multiple row based...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found