dermetfan / knockout-select2

Select2 v4 binding handler for Knockout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Select2 v4 binding handler for Knockout

Build status Bower version NuGet version

Usage

HTML

<select data-bind="select2: options" ></select>

JS

ko.applyBindings({
    options : { } // select2 options
});

This binding is written in AMD. It returns the binding object. It will attach itself to knockout.bindingHandlers.select2 once required for the first time. This can be overridden with a config section in your requirejs config like shown below.

requirejs.config({
  config: {
    'bower_components/knockout-select2v4/src/knockout-select2': {
        name: 'someOtherName'
    }
  }
});

Dependencies

  • jQuery
  • knockout
  • select2

For accurate versions check bower.json

About

Select2 v4 binding handler for Knockout

License:MIT License


Languages

Language:JavaScript 58.2%Language:HTML 41.8%