Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use punches and textInput? #68

Open
jfrank14 opened this issue Jun 28, 2018 · 3 comments
Open

Is it possible to use punches and textInput? #68

jfrank14 opened this issue Jun 28, 2018 · 3 comments

Comments

@jfrank14
Copy link

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
Copy link
Owner

mbest commented Jun 28, 2018

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

@jfrank14
Copy link
Author

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
Copy link
Owner

mbest commented Jun 28, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants