You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've came across a proptype warning when passing an int as options key.
focusItem is declared as a string in App.js seems reasonable enough so i think a simple conversion is enough as a think many people may try to pass an int as the option key, my case was passing the product_id from a an api.
I know that this is against the PropTypes use but i think an exception here adds some kind of flexibility
Steps to reproduce the issue
Just pass an int as the options key, you can try it in the PlayGround.js file
Is "focusedItem" the only prop related to options, that excepts a string? Or we should consider normalize all the options before we pass it down to the component?
A pull request will be really helpful!
Thanks a lot
Issue description
I've came across a proptype warning when passing an int as options key.
focusItem is declared as a string in App.js seems reasonable enough so i think a simple conversion is enough as a think many people may try to pass an int as the option key, my case was passing the product_id from a an api.
I know that this is against the PropTypes use but i think an exception here adds some kind of flexibility
Steps to reproduce the issue
Just pass an int as the options key, you can try it in the PlayGround.js file
What's the expected result?
I think a conversion, maybe wrong
What's the actual result?
A proptype warning
Additional details / screenshot
A fix maybe bampisSyk@9a987e6
The text was updated successfully, but these errors were encountered: