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(VRating): allow string model-value #16129

Merged
merged 2 commits into from Nov 22, 2022
Merged

Conversation

jacekkarczmarczyk
Copy link
Member

@jacekkarczmarczyk jacekkarczmarczyk commented Nov 19, 2022

Description

Changed modelValue prop type from number to string|number

Alternatively examples in docs could be changed from model-value="3" to :model-value="3"

How Has This Been Tested?

playground

Markup:

<template>
  <div>
    <v-rating model-value="3" />
  </div>
  <div>
    num: {{ num }} {{ JSON.stringify(num) }}
  </div>
  <div>
    <v-rating v-model="num" half-increments />
  </div>
  <div>
    str: {{ str }} {{ JSON.stringify(str) }}
  </div>
  <div>
    <v-rating v-model="str" half-increments />
  </div>
</template>

<script setup>
  import { ref } from 'vue'
  const num = ref(3)
  const str = ref('3.5')
</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.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

@jacekkarczmarczyk jacekkarczmarczyk self-assigned this Nov 19, 2022
@johnleider johnleider added the T: bug Functionality that does not work as intended/expected label Nov 22, 2022
@johnleider johnleider added this to the v3.0.x milestone Nov 22, 2022
@johnleider johnleider merged commit caf5555 into next Nov 22, 2022
@johnleider johnleider deleted the fix/v-rating-model-value-string branch November 22, 2022 17:27
mhio pushed a commit to mhio/issue-vuetify that referenced this pull request Nov 26, 2022
Co-authored-by: John Leider <john.j.leider@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VRating VRating T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants