0.0.3 • Published 9 years ago

talio-selectize v0.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
9 years ago

Selectize Widget for being used in the context of a virtual-dom and dom-delegator based framework, such as mercury or talio.

This requires Selectize to be already loaded in the page in the old way (as a global), so you can probably include this CSS file and this JS file and everything will be ok.

It also needs jQuery, which is a dependency of Selectize, and also expects it to be a global.

If you don't like adding <script> tags everywhere, then you can initialize this with

window.$ = require('jquery')
window.selectize = require('selectize')

SelectizeWidget = require('talio-selectize')
SelectizeWidget.init(talio.delegator)

vtree = h('div', {},
  SelectizeWidget({
    name: '',
    value: '',
    options: [{bli: '', 'plo': ''}],
    valueField: 'plo',
    nameField: 'bli',
    'ev-change': 'normal event handler'
  })
)