react-redux-grid
react-redux-grid copied to clipboard
PropTypes (oneOf) error when loading the Grid
Hi,
I found a very similar issue to #166. I continuosly get the following error message in the browser console, as the grid has been loaded:
index.js:2178 Warning: Failed prop type: Invalid prop
data
of value[object Object]
supplied toGrid
, expected one of [null,null].
The solution might be using oneOfType
instead of oneOf
when defining the type of 'data' property.
The code is placed in components/Grid.jsx:
data: oneOf([ arrayOf(object), object, ]),
oneOf
involves the EnumTypeChecker, while oneOfType
involves UnionTypeChecker. Currently the EnumTypeChecker's validate
method always fails and returns the mentioned error.