react-redux-grid icon indicating copy to clipboard operation
react-redux-grid copied to clipboard

PropTypes (oneOf) error when loading the Grid

Open varga-boglarka opened this issue 6 years ago • 0 comments

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 to Grid, 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.

varga-boglarka avatar Sep 05 '18 12:09 varga-boglarka