Skip to content

[Select] Accept boolean v2#12522

Merged
oliviertassinari merged 1 commit into
mui:masterfrom
oliviertassinari:select-boolean-v2
Aug 14, 2018
Merged

[Select] Accept boolean v2#12522
oliviertassinari merged 1 commit into
mui:masterfrom
oliviertassinari:select-boolean-v2

Conversation

@oliviertassinari

@oliviertassinari oliviertassinari commented Aug 14, 2018

Copy link
Copy Markdown
Member

As it turns out, people can provide a boolean too to the input, like the select, it will just be evaluated to a string.

Closes #12517

@oliviertassinari oliviertassinari added scope: select Changes related to the select. type: bug It doesn't behave as expected. labels Aug 14, 2018
@oliviertassinari
oliviertassinari merged commit 769f7d4 into mui:master Aug 14, 2018
@oliviertassinari
oliviertassinari deleted the select-boolean-v2 branch August 14, 2018 18:19
@RavenHursT

Copy link
Copy Markdown

Cool.... so the output (event.target.value) of the Select or Input will still need to be translated from string -> boolean, right?

I think this is acceptable, for sure, since this is how most boolean interaction w/ DOM inputs is handled anyway.. just wanna clarify...

@oliviertassinari

oliviertassinari commented Aug 14, 2018

Copy link
Copy Markdown
Member Author

@RavenHursT We are unopinionated about it. Just like if you were using a raw select component, yes.

@palaniichukdmytro

palaniichukdmytro commented Aug 15, 2018

Copy link
Copy Markdown
Contributor

@oliviertassinari Should it be in next release?. So we can use <Select value={true} > or should use <Select value='true'>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: select Changes related to the select. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants