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

feat(VSlider): introduce track disabled #20874

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mrooding
Copy link

@mrooding mrooding commented Jan 17, 2025

Description

resolves #20872

The current implementation keeps the overall structure and event listeners in place. It simply ignores click events if they do not come from the thumb element.

I'm happy to discuss alternative options but would like to get some feedback first.

Markup:

<template>
  <v-app>
    <v-container>
      <v-slider :track-disabled="true" @end="onChange" />
    </v-container>
  </v-app>
</template>

<script>
  export default {
    name: 'Playground',
    setup () {
      return {
        //
      }
    },
    methods: {
      onChange (value) {
        console.log(value)
      }
    }
  }
</script>

@mrooding
Copy link
Author

Another solution could be to modify when we add pointer-events: none; using a css class. If we remove that from the overall container but keep it on the thumb it should also suffice. We could then remove the guard check inside the click event.

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.

1 participant