Skip to content

Instantly share code, notes, and snippets.

View irfan-yusanif's full-sized avatar

Irfan irfan-yusanif

View GitHub Profile
@isDipesh
isDipesh / ko_selectize.js
Last active April 26, 2024 01:54
ko_selectize.js ; Full details and demo here - http://motorscript.com/selectize-js-binding-knockout-js/
var inject_binding = function (allBindings, key, value) {
//https://github.com/knockout/knockout/pull/932#issuecomment-26547528
return {
has: function (bindingKey) {
return (bindingKey == key) || allBindings.has(bindingKey);
},
get: function (bindingKey) {
var binding = allBindings.get(bindingKey);
if (bindingKey == key) {
binding = binding ? [].concat(binding, value) : value;