knockout.punches icon indicating copy to clipboard operation
knockout.punches copied to clipboard

Is it possible to use punches and textInput?

Open jfrank14 opened this issue 6 years ago • 3 comments

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?

jfrank14 avatar Jun 28 '18 16:06 jfrank14

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

mbest avatar Jun 28 '18 17:06 mbest

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.

jfrank14 avatar Jun 28 '18 17:06 jfrank14

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

mbest avatar Jun 28 '18 17:06 mbest