question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow boolean value on radio element, possibly on others

See original GitHub issue

<radio> element accepts only String and Number as it’s value attribute, with other types erroring on inputValue prop: Invalid prop: type check failed for prop "inputValue". Expected String, Number, got Boolean.

I think at least with radio buttons, and possibly others, mapping selection controls to boolean model is perfectly valid mode of operation and I’d like to see Vuetify allowing this. I tracked this myself in module code, but sources on github differ in a way that doesn’t entirely map for me to what’s in distributed package. Probably some build step makes it like this.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pbfcommented, Aug 25, 2017

Switch and checkbox represent toggling something on or off. Radio buttons represent choice between two semantically equal values. That those values are boolean (or anything else) is a detail of implementation that, I think, should not be determined by UI design.

0reactions
lock[bot]commented, Apr 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReactJS: How to use boolean values in radio buttons?
Currently the solution is to convert the passed attributes from string values to boolean before saving. var str2bool = (value) => { if ......
Read more >
Radio Button Functionality from Boolean Control Array
Is there any way to get the functionality of a radio button (when you select one it clears the last selection) from an...
Read more >
<input type="radio"> - HTML: HyperText Markup Language
A Boolean attribute which, if present, indicates that this radio button is the default selected one in the group.
Read more >
What Is Boolean Logic? Examples of Boolean Logic - Lotame
At the heart of a Boolean Logic expression is the idea that all values are either true or false. In other words, Boolean...
Read more >
Radio button display name and value
Solved: I am not sure if this is possible, but can we have a display text for a radio button and a value?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found