ventnor-selectize

2.0.0 • Public • Published

ventnor-selectize

A ventnor selectize view

build status dependency status

Installation

npm install --save ventnor-selectize

Usage

var Selectize = require('ventnor-selectize')
  , serviceLocator = {}
  , selectedOptions = [ 1, 2, 3 ]
  , service = { find: function (searchTerm, query, sort, options, cb) {} }
  , view = new Selectize(serviceLocator, selectedOptions, { service: service })
 
view.render().$el.appendTo('body')
 
// Emitted when the value changes
view.on('change', function (value) {
  alert(value)
})
 

var view = new Selectize(serviceLocator, selectedOptions, options)

  • serviceLocator - a service locator instance
  • selectedOptions - the options to be selected (as an array)

Options must include:

  • service a service with a find() function that has a signature of function (searchTerm, query, sort, options, cb)

Options can include:

  • logger - defaults to console

Credits

Dom Harrington

License

ISC

Readme

Keywords

none

Package Sidebar

Install

npm i ventnor-selectize

Weekly Downloads

3

Version

2.0.0

License

ISC

Last publish

Collaborators

  • domharrington