[Feature Request] Deselectable v-radio component (radio buttons)
See original GitHub issueHello all,
What problem does this feature solve?
Presently, once selected, a v-radio component cannot be deselected when clicked again. This behavior is the classical behavior of the HTML radio buttons.
The proposed feature is to add a property to make it possible to deselect a selected v-radio when clicked again.
The proposed feature is not what web users used to HTML radio buttons expect, but it adds a very neat addition, making UI really more sleek and powerful in some situations. The pros and cons of this feature are discussed over and over again: https://ux.stackexchange.com/questions/13511/why-is-it-impossible-to-deselect-html-radio-inputs. So the aim of this feature is not to try to convince people to use this feature, but rather to make it possible to use it if it is needed for some usecases.
Our usecase is building sleek surveys where people can easily reset/erase their answers, and that is deselect mutually exclusive options. We already have this HTML component in our old in-house UI library, but as we are switching to Vuetify we would love to have this feature available by default in Vuetify.
If you agree to this feature request we could provide a PR adding this feature. If you don’t agree we would create a custom component on our own, but that would be sad.
What is your proposed solution?
Our proposed solution is to provide a new deselectable
property to v-radio-group
, of course false
by default.
This new property will play well with the already existing mandatory
v-radio-group
property.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:13 (6 by maintainers)
Top GitHub Comments
@johnleider How can you select the correct radio if we need to take his status (checked or unchecked)
https://codepen.io/johnjleider/pen/GYeMPx?editors=1111