material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Warnings about invalid prop type in cases where I do not specify type or I specify type

Open aswamina opened this issue 7 years ago • 2 comments

I get the following warning in my dev tools console.

Warning: Failed prop type: Invalid prop columns[0].type of value string supplied to MaterialTable, expected one of ["boolean","numeric","date","datetime","time","currency"].

The columns property is set as follows : const columns = [ { title: 'Name', type: 'string', render: rowData => rowData.first_name + ' ' + rowData.last_name, searchable: true, cellStyle: {fontSize: 14} }, { title: 'Title', type: 'string', render: rowData => rowData.title, cellStyle: {fontSize: 14} } ]; The documentation says the default is 'string'. This warning shows up even if I do not have the type property for the columns.

I also got another warning : "checkPropTypes.js:19 Warning: Failed prop type: Invalid prop title of type object supplied to MaterialTable, expected string. in MaterialTable (created by ...)

aswamina avatar Jan 09 '19 15:01 aswamina

This is a props bug. I fixed it. It will be resolved in 1.13.0. You can ignore warning.

mbrn avatar Jan 09 '19 16:01 mbrn

@aswamina , there was another bug that is The prop value is marked as required in MTableCell, but its value is undefined.. I fixed this one too. But this is not a blocking bug. So it will be in 1.14.0

mbrn avatar Jan 14 '19 18:01 mbrn