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

fix(VItemGroup): allow object values and custom comparator #14328

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

Tofandel
Copy link
Contributor

Description

Fixes #10571

Motivation and Context

Radio groups with object as values where not properly marked as active because the objects (having different reference) are compared with === instead of deep equality

How Has This Been Tested?

unit test and playground

Markup:

<template>
  <v-container>
    <v-radio-group v-model="radio">
      <v-radio
        label="test 1"
        :value="{test: 1}"
      ></v-radio>
      <v-radio
        label="test 2"
        :value="{test: 2}"
      ></v-radio>
      <v-radio
        label="test 3"
        :value="3"
      ></v-radio>
    </v-radio-group>
  </v-container>
</template>

<script>
  export default {
    data: () => ({
      radio: null,
    }),
  }
</script>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • My code follows the code style of this project.

@KaelWD KaelWD changed the title fix(VItemGroup): allow for custom comparator and objects as values fix(VItemGroup): allow object values and custom comparator Nov 30, 2021
@KaelWD KaelWD merged commit 324b818 into vuetifyjs:master Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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