Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

[Question] How to update input.value with vdom? #313

Closed
svenefftinge opened this issue Sep 28, 2017 · 3 comments
Closed

[Question] How to update input.value with vdom? #313

svenefftinge opened this issue Sep 28, 2017 · 3 comments

Comments

@svenefftinge
Copy link

svenefftinge commented Sep 28, 2017

I'm using a vdom based form with an input field on which I want to reset the value.
Unfortunately, it doesn't work since input.setAttribute('input', newValue) will not update the actual value but only the default one.
How should I solve this? Obtaining the real element and setting the value?

@svenefftinge
Copy link
Author

Maybe a special attribute for such browser managed state would be good?

@blink1073
Copy link
Contributor

Hi @svenefftinge, the way we have been handling this is to use the created element directly, for example in the menu. In light of the React re-license, we are considering moving to using React as a dependency and deprecating the Phosphor virtual dom, cf #302.

@svenefftinge
Copy link
Author

Ok, thanks. I did that, too.

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

No branches or pull requests

2 participants