question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Failed prop type: Invalid prop `page` of type `object` supplied to `SizePerPageOption`, expected `number`

See original GitHub issue

I defined a sizePerPageList with objects containing text and value keys. I get the following warning. Why?

Warning: Failed prop type: Invalid prop page of type object supplied to SizePerPageOption, expected number

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
levantuycommented, Aug 21, 2018

when products.length=0 show same message error: Failed prop type: Invalid prop page of type object supplied to SizePerPageOption, expected number.

0reactions
DJMit-altcommented, Aug 21, 2019

getting following warning

Failed prop type: Invalid prop sizePerPage of type object supplied to PaginationList, expected number. code like - this.options = { sizePerPage: 20, sizePerPageList: [ { text: ‘10’, value: 10 }, { text: ‘20’, value: 20 }, { text: ‘50’, value: 50 }, { text: ‘All’, value:0 } ] }; this.options.sizePerPageList[3].value = (this.props.data)?this.props.data.length:0;

data will be type of Array always.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Failed prop type: Invalid prop `label` of type `object ...
It means you're providing the wrong type to the label prop. It only expects a string, but you're passing a react fragment. Change...
Read more >
invalid prop `rows` of type `object` supplied to `forwardref ...
I am using react-native-snap-carousel, It worked fine, It fetches data fine but i am getting 2 warnings in that app. Warning: Failed prop...
Read more >
How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism for adding type checking to component props.
Read more >
Invalid prop 'value' of type 'object' supplied to 'TextInput' React ...
Coding example for the question Failed prop type: Invalid prop 'value' of type 'object' supplied to 'TextInput' React Native-React Native.
Read more >
react-bootstrap-table - UNPKG
prop -types/index.js\n// module id = 3\n// module chunks = 0","// shim for using ... + propType + '` supplied to `' + componentName...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found