2.1.94 • Published 5 years ago

vue-multiselect-accessibility v2.1.94

Weekly downloads
182
License
MIT
Repository
github
Last release
5 years ago

vue-multiselect Build StatusCodecov branchnpm

Probably the most complete selecting solution for Vue.js 2.0, without jQuery.

Vue-Multiselect Screen

Features & characteristics:

  • NO dependencies
  • Single select
  • Multiple select
  • Tagging
  • Dropdowns
  • Filtering
  • Search with suggestions
  • Logic split into mixins
  • Basic component and support for custom components
  • V-model support
  • Vuex support
  • Async options support
  • > 95% test coverage
  • Fully configurable (see props list below)

Breaking changes:

  • Instead of Vue.partial for custom option templates you can use a custom render function.
  • The :key props has changed to :track-by, due to conflicts with Vue 2.0.
  • Support for v-model
  • @update has changed to @input to also work with v-model
  • :selected has changed to :value for the same reason
  • Browserify users: if you wish to import .vue files, please add vueify transform.

Install & basic usage

npm install vue-multiselect
<template>
  <div>
    <multiselect
      v-model="selected"
      :options="options">
    </multiselect>
  </div>
</template>

<script>
  import Multiselect from 'vue-multiselect'
  export default {
    components: { Multiselect },
    data () {
      return {
        selected: null,
        options: ['list', 'of', 'options']
      }
    }
  }
</script>

<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>

JSFiddle

Example JSFiddle – Use this for issue reproduction.

Examples

in jade-lang/pug-lang

Single select / dropdown

multiselect(
  :value="value",
  :options="source",
  :searchable="false",
  :close-on-select="false",
  :allow-empty="false",
  @input="updateSelected",
  label="name",
  placeholder="Select one",
  track-by="name"
)

Single select with search

multiselect(
  v-model="value",
  :options="source",
  :close-on-select="true",
  :clear-on-select="false",
  placeholder="Select one",
  label="name",
  track-by="name"
)

Multiple select with search

multiselect(
  v-model="multiValue",
  :options="source",
  :multiple="true",
  :close-on-select="true",
  placeholder="Pick some",
  label="name",
  track-by="name"
)

Tagging

with @tag event

multiselect(
  v-model="taggingSelected",
  :options="taggingOptions",
  :multiple="true",
  :taggable="true",
  @tag="addTag",
  tag-placeholder="Add this as new tag",
  placeholder="Type to search or add tag",
  label="name",
  track-by="code"
)
addTag (newTag) {
  const tag = {
    name: newTag,
    code: newTag.substring(0, 2) + Math.floor((Math.random() * 10000000))
  }
  this.taggingOptions.push(tag)
  this.taggingSelected.push(tag)
},

Asynchronous dropdown

multiselect(
  v-model="selectedCountries",
  :options="countries",
  :multiple="multiple",
  :searchable="searchable",
  @search-change="asyncFind",
  placeholder="Type to search",
  label="name"
  track-by="code"
)
  span(slot="noResult").
    Oops! No elements found. Consider changing the search query.
methods: {
  asyncFind (query) {
    this.countries = findService(query)
  }
}

Contributing

# serve with hot reload at localhost:8080
npm run dev

# distribution build with minification
npm run bundle

# build the documentation into docs
npm run docs

# run unit tests
npm run test

# run unit tests watch
npm run unit

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

2.1.94

5 years ago

2.1.93

5 years ago

2.1.92

5 years ago

2.1.91

5 years ago

2.1.90

5 years ago

2.1.89

5 years ago

2.1.88

5 years ago

2.1.87

5 years ago

2.1.86

5 years ago

2.1.85

5 years ago

2.1.84

5 years ago

2.1.83

5 years ago

2.1.82

5 years ago

2.1.81

5 years ago

2.1.80

5 years ago

2.1.79

5 years ago

2.1.78

5 years ago

2.1.77

5 years ago

2.1.76

5 years ago

2.1.75

5 years ago

2.1.74

5 years ago

2.1.73

5 years ago

2.1.72

5 years ago

2.1.71

5 years ago

2.1.70

5 years ago

2.1.69

5 years ago

2.1.68

5 years ago

2.1.67

5 years ago

2.1.66

5 years ago

2.1.65

5 years ago

2.1.64

5 years ago

2.1.63

5 years ago

2.1.62

5 years ago

2.1.61

5 years ago

2.1.60

5 years ago

2.1.59

5 years ago

2.1.58

5 years ago

2.1.57

5 years ago

2.2.0

5 years ago

2.1.56

5 years ago

2.1.55

5 years ago

2.1.54

5 years ago

2.1.53

5 years ago

2.1.52

5 years ago

2.1.51

5 years ago

2.1.50

5 years ago

2.1.49

5 years ago

2.1.48

5 years ago

2.1.47

5 years ago

2.1.46

5 years ago

2.1.45

5 years ago

2.1.44

5 years ago

2.1.43

5 years ago

2.1.42

5 years ago

2.1.41

5 years ago

2.1.40

5 years ago

2.1.39

5 years ago

2.1.38

5 years ago

2.1.37

5 years ago

2.1.36

5 years ago

2.1.35

5 years ago

2.1.34

5 years ago

2.1.33

5 years ago

2.1.32

5 years ago

2.1.31

5 years ago

2.1.30

5 years ago

2.1.29

5 years ago

2.1.28

5 years ago

2.1.27

5 years ago

2.1.26

5 years ago

2.1.25

5 years ago

2.1.24

5 years ago

2.1.23

5 years ago

2.1.22

5 years ago

2.1.21

5 years ago

2.1.20

5 years ago

2.1.19

5 years ago

2.1.18

5 years ago

2.1.17

5 years ago

2.1.16

5 years ago

2.1.15

5 years ago

2.1.14

5 years ago

2.1.13

5 years ago

2.1.12

5 years ago

2.1.11

5 years ago

2.1.10

5 years ago

2.1.9

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago