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