DataTable Warning: Failed prop type: Invalid prop `rows[0]` of type `array` supplied to `DataTable`, expected `object`.
See original GitHub issueWhat package(s) are you using?
-
carbon-components
-
carbon-components-react
Summary
Getting this warning when using DataTable:
Warning: Failed prop type: Invalid prop
rows[0]
of typearray
supplied toDataTable
, expectedobject
.
And I’m facing a problem with refreshing the content of the data table. I have a state variable (rows) that is attached to the data table, but I’m not fetching all the records at once and I have 2 buttons: next/prev.
I can see that the data that is coming from api when calling next/prev page is different and doing this.setState{rows: data}, but the data table is not refreshed and keep showing the first page only!
Relevant information
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Failed prop type: Invalid prop `style` of type `array` supplied to ...
I'm getting this Error: TypeError: undefined is not an object (evaluating 'iter[Symbol.iterator]') once i use your suggestion. – ASIF AKBER. Oct ...
Read more >failed prop type: invalid prop `rows` of type `object` supplied to ...
Warning : Failed prop type: Invalid prop rows[0] of type array supplied to DataTable, expected object. And I'm facing a problem with refreshing...
Read more >type check failed for prop "data". Expected Object, got Array
I'm using laravel-vue-pagination getting this error Invalid prop: type check failed for prop "data". Expected Object, got Array. code is. Copy Code
Read more >DataColumn.DataType Property (System.Data) - Microsoft Learn
myTable = new DataTable("My Table"); // Create DataColumn objects of data types. DataColumn colString = new DataColumn("StringCol"); colString.
Read more >Invalid prop 'value' of type 'number' supplied to 'TextInput'
Warning : Failed Prop type: Invalid prop 'value' of type 'number' supplied to 'TextInput', expected 'string'. If you will see the code of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I used i.toString() there for rows with id 0. But it’s not reproducible… will try to find out what is different in my code!
Thanks a lot for your advice. yes, that was the issue.