-
Notifications
You must be signed in to change notification settings - Fork 133
<input> value does not update #84
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
Comments
Maybe related to #81. |
Digging into the documentation, I found the domProps thing: <input domPropsValue={this.query} onInput={(e) => { this.query = e.target.value; }} /> This actually works. Is the value attribute expected to be passed using domProps? |
@skyrpex, hmm, I think that is expected but |
Awesome! I've made a pen that reproduces the problem. |
@skyrpex, it actually does work as expected, |
@nickmessing yeah, in Vue core there's a check for bindings that should default to domProps instead of attrs: https://github.com/vuejs/vue/blob/dev/src/platforms/web/util/attrs.js#L10-L18 |
@yyx990803, is it okay if I make a PR for that for jsx? |
@yyx990803, I think it should be just documented because we can't handle same it in spread scenarios unless we move this logic to runtime, which is not worth it IMO |
@nickmessing there is a runtime helper for that (available on instances as |
Thank you very much everyone, It resolve for me. #81 |
As mentioned before, you can use |
@nickmessing you have just saved my life. The sugar works perfect with Element UI. |
The example below reproduces a problem where the <input>'s value doesn't update when it's changed from the model.
Dependencies (from .yarn.lock):
Codepen
https://codepen.io/skyrpex/pen/Xgqaaz
Example
The text was updated successfully, but these errors were encountered: