vue-dropdown-tree-select

1.0.4 • Public • Published

Vue Dropdown Tree Select

NPM License

Lightweight component for displaying hierarchical data < 15k 😎
Emits selections to parent component

dropdown-tree-select

Usage

npm i vue-dropdown-tree-select

<script setup>
import DropdownTreeSelect from 'vue-dropdown-tree-select';
import 'vue-dropdown-tree-select/dist/style.css';

const items = [
  { groupLabel: 'Frontend Developer',
    children: [
      {groupLabel: 'Vue',
        children: [ { label:'Options Api', value: 'optionsApi'},
          { label: 'Composition Api', value: 'compositionApi' }]},
      { label: 'React', value: 'react'},
      { label: 'Angular', value: 'angular'}
    ]},
  { groupLabel: 'Backend Developer',
    children: [
      {label: 'Bun', value: 'bun' },
      { label: 'Deno', value: 'deno' },
      { label:'Node', value: 'node' }
    ]},
];

function handleChange(selections) {
  //todo selections = [ {label '', value: ''}, .... ];
  // console.log(selections);
}

</script>


<template>
<DropdownTreeSelect :items="items" @change-selections="handleChange"/>
</template

Contact

Feel free to ping me 💫
connect@giladshohat.com

giladshohat.com

Dependents (0)

Package Sidebar

Install

npm i vue-dropdown-tree-select

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

12.6 kB

Total Files

5

Last publish

Collaborators

  • gshohat