@profiscience/knockout-contrib-bindings-ctrl-click
v1.0.1
Published
KnockoutJS Ctrl+Click Binding
Downloads
5
Readme
@profiscience/knockout-contrib-bindings-ctrl-click
Built-in click binding, filtered for ctrl+click
NOTE: Consider MacOS (where meta+click is more intuitive) and mobile users (where there is no access to ctrl) when using this binding
Usage
// register as "ctrlClick"
import '@profiscience/knockout-contrib-bindings-ctrl-click'
// register as custom name
import * as ko from 'knockout'
import { ctrlClickBindingHandler } from '@profiscience/knockout-contrib-bindings-ctrl-click'
ko.bindingHandlers['click.ctrl'] = ctrlClickBindingHandler
<div data-bind="ctrlClick: (event, data) => console.log(data)"></div>