1.0.4 • Published 3 years ago

vue-wheel-select v1.0.4

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

vue-wheel-select

A simple scrolling select and touch compatible component.

DEMO

Installation

# npm
npm install vue-wheel-select --save

# Yarn
yarn add vue-wheel-select

Usage

Minimal example

<template>
  <div>
    <VueWheelSelect
      v-model="selectedBrand"
      :options="brands"
      allowNullSelection
    />
  </div>
</template>

<script>
  import VueWheelSelect from 'vue-wheel-select';

  export default {
    data () {
      return {
        selectedBrand: null,
        brands: [
          'Scarpa',
          'Black Diamond',
          'La Sportiva',
          'Tenaya',
          'Five Ten',
          'Mad Rock',
          'Evolv',
          'Red Chili',
        ],
      }
    },
    components: {
      VueWheelSelect
    }
  }
</script>

Available props

The component accepts these props:

AttributeTypeDefaultDescription
v-model / valueAnySet or Get selected value (required)
optionsArraynullSelect options (required) s
optionHeightNumber48Height of a single selectable item
getOptionLabelFunctionReturns the optionFunction called to display the label of each options
getOptionKeyFunctionReturns the optionFunction called to set the option key
allowNullSelectionBooleanfalseAdd a null option
nullSelectionMessageString'Select an option'Text to display for the null option
1.0.4

3 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago