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

[Documentation] VList example is incomplete #19829

Closed
PaulCombal opened this issue May 16, 2024 · 2 comments · Fixed by #20373
Closed

[Documentation] VList example is incomplete #19829

PaulCombal opened this issue May 16, 2024 · 2 comments · Fixed by #20373

Comments

@PaulCombal
Copy link

Problem to solve

I want to make a list of checkboxes using lists. Naturally I go to lists. There is an example of how to do so but it's incomplete.
https://vuetifyjs.com/en/components/lists/#action-and-item-groups

Why do they put a "value" prop on the list-item if it's to never be used? How do I get that value back?

Proposed solution

The v-list tag in this example should be:

<v-list lines="three" select-strategy="classic" v-model:selected="slectedSettings">

To show that the values are actually stored in selectedSettings.

@t407o
Copy link
Contributor

t407o commented Jun 4, 2024

I guess the value prop in v-list-item is to define the assigned value to v-list's v-model:selected when the item is selected.

Just yesterday I proposed the docs change to v-list-item because I was confused too.
https://github.com/vuetifyjs/vuetify/pull/19940/files

@J-Sek
Copy link
Contributor

J-Sek commented Aug 22, 2024

It is incorrectly ported from v2 and should actually be hidden in my opinion. (edit: it is currently the only example with v-list-item-action on this page, so should be fixed and left there)

  • missing script is the obvious part
  • markup does not include v-list-group although description says it does
  • does not showcase selection-strategy="classic" but rather leaf
  • isActive can be replaced with isSelected which is confusing

The problem is v-list-group no longer emits nor binds any model for selection state. And the actual example for v-list-group with classic selection has this weird behavior I cannot pinpoint to specific line in the sources...

If I understand the direction of the changes, groups are now only for expand/collapse and it is already pretty clearly presented in the "Sub group" example (if we ignore huge indents and kinda unexpected collapsing.. I wish it had open-strategy="multiple" instead of default one).

To be frank I don't understand the "easily connect actions to your tiles" even in the v2 version, so I wish I could get an opinion from someone from the core team.

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

Successfully merging a pull request may close this issue.

3 participants