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

VTreeSelect not defaulting based on v-model #24

Open
socialRanvir opened this issue Jan 18, 2021 · 1 comment
Open

VTreeSelect not defaulting based on v-model #24

socialRanvir opened this issue Jan 18, 2021 · 1 comment

Comments

@socialRanvir
Copy link

Just playing around with the library and I noticed that when supplying the v-model with some initial values, they aren't preselected, however normal selection works.

Example:

<template>
    <div>
        <v-tree-select
            v-model="item"
            :autocomplete="autocomplete"
            chips
            :dense="dense"
            :multiple="multiple"
            :items="items"
            :clearable="clearable"
            :dark="dark"
            hoverable
            selectable
            selected-color="primary"
            selection-type="independent"
            open-all
        />
    </div>
</template>
data: () => ({
        item: [{'id': 2, 'name': 'Calendar : app'}],
        items: staticitems, // see data source
        chips: true,
        multiple: true,
        dense: true,
        clearable: false,
        dark: false,
        autocomplete: true,
        customSlots: false,
    }),

The staticitems is from your example

@nlien
Copy link

nlien commented Nov 28, 2021

Also trying to use v-model to pre-select options, but without luck. Am I missing something?
Made a pen here:
https://codepen.io/nilslien/pen/jOGNpNR

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

No branches or pull requests

2 participants