HAVE YOU ALREADY SEARCHED FOR SIMILAR ISSUES? PLEASE HELP US OUT AND DOUBLE-CHECK FIRST!
ALSO, PLEASE DON'T BE THAT PERSON WHO DELETES THIS TEMPLATE. IT'S HERE FOR A REASON.
THANKS!
WHICH VERSION OF REACT ARE YOU USING?
Officially Supported:
[ ] v0.14.x
Community Supported:
[ ] v15.0.x
WHICH BROWSER ARE YOU USING?
Officially Supported:
[ ] IE 9 / IE 10 / IE 11
[ ] Edge
[ ] Chrome
Should work:
[ ] Firefox
[ ] Safari
I'm submitting a ... (check one with "x")
[ ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md
Current behavior
Warning: Invalid argument supplid to oneOfType. Expected an array of check functions, but received undefined at index 0.
createUnionTypeChecker @ factoryWithTypeCheckers.js?dcd5:326
Expected/desired behavior
use React.PropTypes.element instead of React.PropTypes.component
Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior?
use React.PropTypes.element instead of React.PropTypes.component
What is the motivation / use case for changing the behavior?
The code is wrong and throws a warning
Is this possibly the result of an update to PropTypes? First off the PropTypes is now a new project (but I still think it works inside React). I saw the following (where the error was being thrown):
resultRenderer: React.PropTypes.oneOfType([React.PropTypes.component, React.PropTypes.func])
It seems the root of the problem is React.PropTypes.component doesn't exist, nor does the actual project PropTypes have it. Not sure what it should be or what it is supposed to use.
Maybe try "element" instead of "component"
https://facebook.github.io/react/docs/typechecking-with-proptypes.html#proptypes
I am having this same issue and thought it was strange the 'supplied' was spelled as 'supplid'.
Hi I'm having the error: "Warning: Invalid argument supplid to oneOfType. Expected an array of check functions, but received undefined at index 0."
It's happening on Internet Explorer and Chrome, but this error does not appear on Firefox
The code is on production and I implemented infinite scroll and everything is working, only I'm getting this warning above.
// At the top
let ReactDataGrid = require('react-data-grid');
const {Toolbar, Data:{Selectors}} = require('react-data-grid-addons');
// Somewhere
....etc
enableCellSelect={true}
enableRowSelect={false}
columns={this.columns}
rowGetter={this.rowGetter}
rowsCount={this.getSize()}
minHeight={500}
toolbar={
onAddFilter={this.handleFilterChange}
onClearFilters={this.onClearFilters}
minColumnWidth={150}
ref={(element) => {
if (element !== null) {
let base = element.base;
base.onScroll = this.onScroll;
self.rowOffsetHeight = element.getRowOffsetHeight();
}
}}
/>
....etc
Yep, since React 0.12 React.PropTypes.component was renamed to React.PropTypes.element. So it is definitely a bug. I can submit a pull request if no one else is working on this. Should I proceed?
Oh wait... The error is in one of the dependencies ("ron-react-autocomplete": "^4.0.2", https://www.npmjs.com/package/ron-react-autocomplete, https://github.com/malonecj/react-autocomplete) which is forked from https://github.com/prometheusresearch/react-autocomplete. And this guy doesn't seem to maintain the repo anymore. It looks like it is a major change that may take more time to fix & test.
Hi, can anyone tell me the status on this? This error is causing all of my unit tests to fail. :(
Its still an issue.
Warning: Invalid argument supplid to oneOfType. Expected an array of check functions, but received undefined at index 0.
I have same issue - I have narrowed the issue to this:
import { Editors, Formatters } from 'react-data-grid-addons'
Fixed this by changing this line in /node_modules/react-data-grid-addons/dist/react-data-grid-addons.js
resultRenderer: React.PropTypes.oneOfType([React.PropTypes.component, React.PropTypes.func])
to:
resultRenderer: React.PropTypes.any
This has been fixed in https://github.com/malonecj/react-autocomplete/pull/9
@amanmahajan7 I just did a fresh install of react-data-grid and npm pulled v2.0.60 and I'm still getting the same warning
Warning: Invalid argument supplid to oneOfType. Expected an array of check functions, but received undefined at index 0
Exactly the same issue as @jtlindsey
We're still getting the warning because @malonecj didn't rebuild before publishing [email protected]. Note the last modified timestamps. Can we get a rebuild/republish, please? Thanks!
Thanks for pointing this out, we will take a look.
@amanmahajan7 Hi, I think this bug should be re-opened as the fix didn't make it from ron-react-autocomplete to react-data-grid
ron-react-autocomplete has been republished, this warning should be fixed now
I think I still get this error on 2.0.64 :(
I am getting the same error. I got it from the Drop down editor from React-data-grid-addon
Most helpful comment
@amanmahajan7 I just did a fresh install of react-data-grid and npm pulled v2.0.60 and I'm still getting the same warning
Warning: Invalid argument supplid to oneOfType. Expected an array of check functions, but received undefined at index 0