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

Bug - Select component requires a size prop #534

Closed
diego-codes opened this issue May 12, 2020 · 4 comments
Closed

Bug - Select component requires a size prop #534

diego-codes opened this issue May 12, 2020 · 4 comments
Labels
type: bug Something isn't working

Comments

@diego-codes
Copy link
Contributor

Expected behavior -
Given that the documentation states that the size prop for the Select component. The Select component should allow consumers to not provide the size prop.

Actual behavior -

When a size prop is not set to "sm" or "xl", a prop-type validation warning is logged:

Failed prop type: Invalid prop "size" of value "" supplied to "Select", expected one of ["sm","xl"].

Steps for reproducing

CodeSandbox

  1. Render a simple Select component
  2. Notice that the console logs a prop-type error for the size prop

Screenshots

image

Optional information

Version - 1.22.1

@SimonFinney SimonFinney added the type: bug Something isn't working label May 12, 2020
@SimonFinney
Copy link
Contributor

Symptom of carbon-design-system/carbon#5481

@jendowns
Copy link
Contributor

jendowns commented May 13, 2020

@SimonFinney @diego-codes I opened a new issue about this here, using Diego's examples: carbon-design-system/carbon#6076

Please feel free to weigh in there 👍

UPDATE: I also went ahead and opened this one about enforcing defaultProps definitions in carbon-components-react, if anyone wants to add thoughts -- carbon-design-system/carbon#6077

@jendowns
Copy link
Contributor

@diego-codes Actually I've closed that issue because I believe this is a versioning problem. The propType warnings were fixed in a recent version of Carbon but we are only on 7.10.0 at the moment. carbon-design-system/carbon#5481 fixed the issue upstream

@diego-codes
Copy link
Contributor Author

Oh, how that's good to know. Thank you~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants