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

[Bug Report] v-radio-group not selected initially with value type of "Object" #10571

Closed
haugero opened this issue Feb 13, 2020 · 8 comments · Fixed by #14328
Closed

[Bug Report] v-radio-group not selected initially with value type of "Object" #10571

haugero opened this issue Feb 13, 2020 · 8 comments · Fixed by #14328
Assignees
Labels
C: VChipGroup C: VRadioGroup VRadioGroup T: bug Functionality that does not work as intended/expected
Milestone

Comments

@haugero
Copy link

haugero commented Feb 13, 2020

Environment

Vuetify Version: 2.2.12
Vue Version: 2.6.11
Browsers: Chrome 80.0.3987.87
OS: Mac OS 10.15.3

Steps to reproduce

Just open Codepen link and see the radio group

Expected Behavior

The radio button "two" is initially selected

Actual Behavior

No radio button is selected initially

Reproduction Link

https://codepen.io/ohauger/pen/gOpPpje

Other comments

I also tried to set the "value-comparator" with my own compare function BUT the function never get's called

@ghost ghost added the S: triage label Feb 13, 2020
@jacekkarczmarczyk jacekkarczmarczyk added C: VRadioGroup VRadioGroup invalid The issue is missing information or is not a valid bug/feature request and removed S: triage labels Feb 19, 2020
@jacekkarczmarczyk
Copy link
Member

Not a bug

image

VRadioGroup/VRadio doesn't have value comparator, you need to use the same object:

https://codepen.io/jkarczm/pen/YzXWRMe

@KaelWD
Copy link
Member

KaelWD commented Feb 19, 2020

image

@KaelWD KaelWD reopened this Feb 19, 2020
@KaelWD KaelWD added T: documentation and removed invalid The issue is missing information or is not a valid bug/feature request labels Feb 19, 2020
@jacekkarczmarczyk
Copy link
Member

how did i miss it

@KaelWD
Copy link
Member

KaelWD commented Feb 19, 2020

Or is it a bug? valueComparator was added in 78964e3 but then radios were refactored to use VItemGroup instead, which doesn't have valueComparator.

@Invisibly

This comment has been minimized.

@johnleider johnleider added this to the v2.3.x milestone Oct 27, 2020
@ElijahKotyluk
Copy link
Contributor

One of the base mixins for VRadioGroup is Comparable, but if you pass value-comparator a function it doesn't ever get called.

@KaelWD KaelWD modified the milestones: v2.3.x, v2.4.x Dec 23, 2020
@KaelWD KaelWD modified the milestones: v2.4.x, v2.5.x May 11, 2021
@Tofandel
Copy link
Contributor

Tofandel commented Oct 26, 2021

Revisiting this, I just encountered this bug, the value comparator mixin is indeed applied on the VRadioGroup but never used, effectively making the whole radio group with object as values case invalid #1316

As for the doc part it also inherits the "multiple" prop and the doc picks it up, but it doesn't make sense to have multiple values for VRadioGroup, I don't know if anything can be done there

@Ovsdrak

This comment has been minimized.

@KaelWD KaelWD added the T: bug Functionality that does not work as intended/expected label Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VChipGroup C: VRadioGroup VRadioGroup T: bug Functionality that does not work as intended/expected
Projects
None yet
8 participants