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

[Select] Accept boolean #12429

Merged
merged 1 commit into from Aug 6, 2018
Merged

Conversation

oliviertassinari
Copy link
Member

Fix @ali-jalaal's concern reported in #10845 (comment).

@oliviertassinari oliviertassinari added new feature New feature or request component: select This is the name of the generic UI component, not the React module! labels Aug 6, 2018
@oliviertassinari oliviertassinari merged commit a9309bb into mui:master Aug 6, 2018
@oliviertassinari oliviertassinari deleted the select-boolean branch August 6, 2018 18:49
@ali-jalaal
Copy link

@oliviertassinari Thank you.

@palaniichukdmytro
Copy link
Contributor

Looks like it does not fixed in last release
https://codesandbox.io/s/ym1o3189y9

@glowkeeper
Copy link

glowkeeper commented Jan 27, 2019

I don't think it's fixed, either! With the following code:

static isSecondary = [
  { value: false, label: "No" },
  { value: true, label: "Yes" }
]

I get this message:

Failed prop type: Invalid prop field.value supplied to FSelect

Help!

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jan 27, 2019

@palaniichukdmytro Your demo works fine with v3.9.1.
@glowkeeper Do you have a reproduction example?

@glowkeeper
Copy link

@oliviertassinari - not sure what you mean!

However, I 'may' have lumped this issue on the wrong repo'. Note this code:

<Field
 name="reportingOrgIsSecondary"
 label={OrganisationReport.reportingOrgIsSecondary}
 component={Select}
 options={Helpers.isSecondary}
/>

(Where Helpers.isSecondary is the isSecondary object array given above).

That code sets Select options for the Material-UI Formik Components node package, and I'm uncertain what version of material-ui that plugs into....

@glowkeeper
Copy link

glowkeeper commented Jan 27, 2019

@oliviertassinari ah, hold on - Material-UI Formik Components plugs into my copy of material-ui - oops! I'm using 3.0.3. Is that the issue?

@oliviertassinari
Copy link
Member Author

Could be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants