-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Rendering boolean values as a checkbox #1120
Comments
Well, a checkbox would work if the given property/parameter is mandatory. If it is not, you need a way to not set it, so that's three values - true/false/unset. A select allows you to have an empty value as well. |
Checkboxes do have three states:
The rendering algorithm would thus be: default to |
UX-wise, I think it would be confusing. Also, it looks like it is supported by IE9 onwards and currently we aim to support IE8 as well. |
This is one of the use cases, when selecting multiple values, indeed :) As far as UX is concerned, the only way to answer properly would be to present to users the choice between the current “empty/true/false” select and a checkbox on the default “indeterminate” state. As far as I'm concerned, I know I would prefer the latter. Finally, browser support is mostly about rendering (otherwise the default is “unchecked”). If really IE8 is mandatory, then adding a polyfill is not that much work. |
I'm not sure it's worth the effort (especially with IE8 support) and with regards to prioritization, it's definitely not at the top of the list. A PR could work here if it covers everything and has the option to be turned on (it should be off by default), but I'm not even sure this is the kind of customization we're looking to add. If more people comment and +1 (or -1 as well), it may be worth considering. |
@webron - to quote your previous comment:
I'm currently using what's in the master branch and boolean values display as a drop-down with only 2 values ( Is this a bug (if so, I can open a new issue) or done by design? |
@morficus - that sounds like a bug and yes, please open a new issue on it. |
I totally agree with @MattiSG proposal. |
@ponelat can you make sure that if |
What's the link with the issue at hand?
|
I do not agree with the proposal of changing it from a select box to checkboxes, and here is why:
|
@morficus: it's debatable:
|
Now that we're about ready to drop IE8, I think the solution from @MattiSG makes sense. |
Going to close this one out as we're not going to implement it from our end. @morficus's latest points do make sense. If anyone wants to make a new proposal, by all means do so, though it would be better if it is through a PR. Can't guarantee it'll be accepted, but we'll definitely review it. |
This makes no sense with formData.. with formData you should send |
Hi,
It is documented that
"type": "boolean"
values are rendered as a<select>
, and that you may change the defaulttrue
/false
options.However, the most logical GUI for an "on or off" value would be a checkbox. What's the rationale for not displaying a checkbox?
The text was updated successfully, but these errors were encountered: