0.0.5 • Published 3 years ago

@feinzer/v-dropdown v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@feinzer/v-dropdown

Simple and reusable select/dropdown component using VueJS Slots.

Installation

npm install @feinzer/v-dropdown

or

yarn add @feinzer/v-dropdown

Usage

import { Dropdown } from '@feinzer/v-dropdown';

export default {
  ...
  components: {
    Dropdown,
  },
  ...
  data() {
    return {
      selected: Object,
      options: [
        ...
      ]
    };
  },
  ...
};
<Dropdown
  v-slot="{ select }"
  v-model="selected"
>
  <div
    v-for="option in options"
    :key="option.key"
    @click="select(option)"
  >
    Option content
  </div>
</Dropdown>

Props

Dropdown

PropertyTypeDefaultDescription
placeholderStringemptyText to show when no option is selected
labelStringemptyKey name of the selected object to show when an option is selected
canSearchBooleanfalseEnables or disables the ability to search through the options.
@searchEventTriggered whenever you input something in the search text input. Used to filter results.
0.0.5

3 years ago

0.0.4

3 years ago

0.0.3-d

3 years ago

0.0.3-c

3 years ago

0.0.3-b

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago