-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
onChange and value #152
Comments
Well, it appears that Sablono wraps elements with value (such as select and input): https://github.com/tonsky/sablono/blob/master/src/sablono/interpreter.cljc#L27 In short, it does not produce this: <input value="whatever" onChange={log} /> but this: <wrapper value="whatever" onChange={log}>
<input value={inputState.state_value} onChange={innerOnChange} />
</wrapper> where function(v) {
if(!wrapper.props.onChange) return;
input.setState({ state_value: v })
wrapper.props.onChange(v);
} |
Yeah. Inputs are a huge mess in Rum/Sablono/React integration. I hope to fix or at least clean it up one day |
I think the simplest would be to throw out the wrapped components and synchronously call |
that is true. Have to ditch sablono first though |
fixed in 0.12.0 |
Hello!
I assume that if
:value
attribute is constant it will be always the same.But I can easily change value of this component:
But! if I completely remove
:on-change
it will be all right.Is it expected behavior? What should I do?
The text was updated successfully, but these errors were encountered: