Skip to content

Conversation

@oumoussa98
Copy link
Member

fixes #21075

Description

Markup:

<template>
  <v-app>
    <v-container>
      <v-treeview :items="items" selectable />
    </v-container>
  </v-app>
</template>

<script setup>
import { ref } from "vue";

const items = [
  {
    id: 1,
    title: "Files :",
    props: { disabled: false },
    children: [
      { id: 2, title: "Calendar : app" },
      { id: 3, title: "Chrome : app", props: { disabled: true } },
      { id: 4, title: "Webstorm : app" },
    ],
  },
  {
    id: 5,
    title: "Applications :",
    props: { disabled: true },
    children: [
      { id: 6, title: "Calendar : app" },
      { id: 7, title: "Chrome : app", props: { disabled: true } },
      { id: 8, title: "Webstorm : app" },
    ],
  },
];
</script>

@oumoussa98 oumoussa98 requested a review from a team March 17, 2025 22:13
@MajesticPotatoe MajesticPotatoe added T: bug Functionality that does not work as intended/expected C: VTreeview labels Mar 18, 2025
Copy link
Contributor

@J-Sek J-Sek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After playing a bit with it.. I think the best thing would be to drop pointer-events from entire thing and children as well.

  • (without this change) checkboxes are available to toggle when focused with keyboard and it seems like a valid interaction
  • (with change selectively applied to action, current PR code) open-on-click is a bit inconsistent

Developers can put info-icons with tooltips or any other interactive element and it rarely makes sense to disable them all... except the navigation (href, to).

I am curious what others would think about this:

.v-treeview-item.v-list-item--disabled:not(a) {
  pointer-events: auto;
}

playground

@johnleider
Copy link
Member

After playing a bit with it.. I think the best thing would be to drop pointer-events from entire thing and children as well.

  • (without this change) checkboxes are available to toggle when focused with keyboard and it seems like a valid interaction
  • (with change selectively applied to action, current PR code) open-on-click is a bit inconsistent

Developers can put info-icons with tooltips or any other interactive element and it rarely makes sense to disable them all... except the navigation (href, to).

I am curious what others would think about this:

.v-treeview-item.v-list-item--disabled:not(a) {
  pointer-events: auto;
}

playground

Only feedback would be ripples are still working on the checkboxes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: VTreeview T: bug Functionality that does not work as intended/expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][3.7.15] VTreeviewItem disabled prop prevents expanding children

5 participants