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(VSlider): fix thumb shifting position when toggling disabled state #11306

Merged
merged 1 commit into from
May 4, 2020

Conversation

nekosaur
Copy link
Member

@nekosaur nekosaur commented May 2, 2020

Description

thumb got recreated when slider was disabled, instead of reused.

Motivation and Context

closes #11303

How Has This Been Tested?

playground

Markup:

<template>
  <div>
    <v-switch label="vertical" v-model="vertical"></v-switch>
    <v-switch label="rtl" v-model="$vuetify.rtl"></v-switch>
    <v-switch label="disabled ticks" v-model="enabledTicks"></v-switch>
    <v-slider max="10" min="0" ticks :disabled="!enabledTicks" v-model="slide" :vertical="vertical"></v-slider>
    <v-divider></v-divider>
    <v-switch label="disabled no ticks" v-model="enabledNoTicks"></v-switch>
    <v-slider max="10" min="0" :disabled="!enabledNoTicks" v-model="slide2"></v-slider>
  </div>
</template>

<script>
  export default {
    data: () => ({
      enabledNoTicks: true,
      enabledTicks: true,
      slide: 5,
      slide2: 5,
      vertical: false,
    }),
  }
</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)

@nekosaur nekosaur added the C: VSlider VSlider label May 2, 2020
@nekosaur nekosaur added this to the v2.2.x milestone May 2, 2020
@nekosaur nekosaur self-assigned this May 2, 2020
@johnleider johnleider merged commit 1fa2f92 into master May 4, 2020
@johnleider johnleider deleted the fix/11303-disabled-slider-thumb branch May 4, 2020 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VSlider VSlider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] disabled slider with ticks
2 participants