kolesnikovav / vuetify-toolkit

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

Provide pagination for treeselect component #45

Open kolesnikovav opened 3 years ago

kolesnikovav commented 3 years ago

Provide adjustable pagination for v-treeselect component similar as v-datatable for large amount of data

emyasnikov commented 3 years ago

Maybe it's better to load children upon select like in treeview https://vuetifyjs.com/en/components/treeview/#load-children and/or search for items and load them asynchronously https://vuetifyjs.com/en/components/autocompletes/#asynchronous-items

kolesnikovav commented 3 years ago

This is a good idea, but i don't know the way to fix the height of selection area and scroll content inside treeview

emyasnikov commented 3 years ago

I had kind of light version of tree select using parts from Vuetify docs. As you can see VMenu has limited height, so overflow works:

  <v-menu
    v-model="menu"
    max-height="304"
    offset-y
    tile
    :close-on-content-click="false">
    <template #activator="{ on, attrs }">
      <v-text-field
        v-bind="attrs"
        v-on="on"
        append-icon="mdi-menu-down"
        hide-details
        readonly
        ref="text"
        :label="label"
        :value="input" />
    </template>
    <v-sheet>
      <v-treeview
        v-model="selected"
        selectable
        selection-type="independent"
        :active="selected"
        :items="items"
        :open-all="openAll" />
    </v-sheet>
  </v-menu>