Skip to content

PropTypes (oneOf) error when loading the Grid #216

@varga-boglarka

Description

@varga-boglarka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions