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

Getting error Failed prop type: Invalid prop dataSource of type array supplied to Constructor, expected object. #78

Closed
burkilic opened this issue May 24, 2017 · 2 comments
Assignees
Labels

Comments

@burkilic
Copy link

When trying to bind an array to igGrid's dataSource, I get the following error:

Warning: Failed prop type: Invalid prop dataSource of type array supplied to Constructor, expected object.

Just to confirm this is caused by igniteui-react.js, I tried this: I manually went into node_modules/igniteui-react/igniteui-react.js and changed this (line 1195):
dataSource: React.PropTypes.object,
to this:
dataSource: React.PropTypes.array,

And the warning disappeared as expected.

Here are the package versions I'm using:

"@types/ignite-ui": "0.0.2",
"@types/jquery": "^2.0.45",
"@types/prop-types": "15.5.1",
"@types/react": "15.0.24",
"@types/react-dom": "15.5.0",
"@types/react-redux": "4.4.40",
"igniteui-react": "1.0.1",
"jquery": "3.1.0",
"jquery-ui": "1.10.5",
"prop-types": "15.5.10",
"react": "15.3.2",
"react-dom": "15.3.2",
"react-redux": "5.0.5",
"redux": "3.6.0",
"redux-devtools-extension": "2.13.2",
"redux-thunk": "2.2.0",
"rxjs": "5.4.0"
@skrustev
Copy link
Member

Since the 'dataSource' should indeed be able to accept array as well as object or string, #79 addresses this issue.

@burkilic
Copy link
Author

Thanks @skrustev. I should clarify for others that it's a warning and not an error so the grid is able to render the data after all.

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

No branches or pull requests

4 participants