Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropTypes (oneOf) error when loading the Grid #216

Open
varga-boglarka opened this issue Sep 5, 2018 · 0 comments
Open

PropTypes (oneOf) error when loading the Grid #216

varga-boglarka opened this issue Sep 5, 2018 · 0 comments

Comments

@varga-boglarka
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant