mbest / knockout.punches

A collection of enhanced binding syntaxes using Knockout 3+
http://mbest.github.io/knockout.punches/
238 stars 19 forks source link

Is it possible to use punches and textInput? #68

Open jfrank14 opened 6 years ago

jfrank14 commented 6 years ago

I love punches for the ability to write

<input value="{{myField}}" />

which creates a binding like:

<input data-bind="value:myField" >

But in some cases I also want more immediate updates using textInput:

<input data-bind="textInput: myField" />

Is there any way to accomplish this in punches?

mbest commented 6 years ago

Have you tried <input textinput="{{myField}}" />?

jfrank14 commented 6 years ago

D'oh, that works. I think I thought it wouldn't because value is an attribute of the input element in native HTML but textinput isn't. My bad. Thanks.

mbest commented 6 years ago

No problem. I could make it more clear in the documentation.