0.2.1 • Published 5 years ago

vue-selector-multioption v0.2.1

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

vue-selector-multioption

npm npm

Index

Description

This is a fast-implement vue multioption select.

Advices, recommendations... are welcome :heart:

Live Demo

https://jsfiddle.net/Ln9q4aob/55/

TODO List

  • Create a external page with explanations and demos

Usage

There are two ways of usage

Global Scoped 1. Add your import on top of your main.js and add as a Vue plugin

import Vue from 'vue';
import  VueSelectorMultioption  from  'vue-selector-multioption';
Vue.use(VueSelectorMultioption);
  1. Use it wherever you want
<vue-selector-multioption :options="options.roles"  v-model="parameters.roles" />

Local scoped (DO NOT ACCEPT PARAMETERIZATION) 1. Add your import on top of you vue file.

import  VueSelectorMultioption  from  'vue-selector-multioption';
  1. Add as a component into you Vue view/component.
components: {
	VueSelectorMultioption
}
  1. Add the component's tag into your template.
<VueSelectorMultioption :options="options.roles"  v-model="parameters.roles" />

Global parameterization

Example

    import VueSelectorMultioption from 'vue-selector-multioption'
    Vue.use(VueSelectorMultioption, {
        i18n: {
            noOptionsSelected: "No se encontraron resultados",
            noResultsFound: "Selecciona una opcion",
            inputPlaceholder: "¿Qué buscas?"
        }
    })

Shortcuts

Note: Shortcuts only work with the options list opened

KeyAction
Arrow - DownNavigates downward between options
Arrow - UpNavigates upward between options
EnterSelect the focused option when navigating
ESCClose the options list

Properties

  • options This is a Object with attributes "label" and "value" whose will be displayed on the dropdown.
  • v-model If you work with vue, you know that. Set there the parameter where the component will emit the value.

Return

Array of selected values. Values will be those given in the "options" parameter.

0.2.1

5 years ago

0.2.0

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago