material-table: Warning: Failed prop type: Invalid prop `actions[0]` supplied to `MaterialTable`.
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()
},
}
]}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Merge pull request #128 from halvardssm/bug/actions_icon_fix_#127 Fixed error regarding actions/icon #127 — committed to mbrn/material-table by mbrn 6 years ago
Try this
icon: () => <Edit/>
I am having same error in Material Table using this
and this
Issued solved. If any one get this error you can try this
Thanks, this code is works!
@mbrn
Great ,upgrade to 1.29.1 then resolve this problem, Thank you for your reply!
Will do then 👍
Thank you for your support! Let me know if you would like me to make a PR on it 😃
@mbrn Thanks for looking into this. I recently updated to 1.8 from 1.2, I am not completely sure but I don’t think I had the error in 1.2.