kolesnikovav / vuetify-toolkit

The set of additional vuetify components
MIT License
28 stars 5 forks source link

VTreeSelect not defaulting based on v-model #24

Open socialRanvir opened 3 years ago

socialRanvir commented 3 years ago

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 commented 2 years ago

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