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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i ventnor-selectize

Weekly Downloads

2

Version

2.0.0

License

ISC

Last publish

Collaborators

  • domharrington