Keep reference to real synthetic input component#351
Conversation
|
I've been looking to finalizing this, but seems like this approach can't work with material-ui 1.0 as I'm starting to think it will be near impossible to fix this until React starts supporting async rendering (could be soon: https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html). I'll keep thinking about this and if I find solution, before I'll merge it or release 0.8 I'll add examples for Material-UI, both 0.20 and 1.0-beta and React-bootstrap so we can be sure the approach works for different cases. If I don't find solution, I'll likely revert the current synthetic-input code before release, as I think it is broken and will just cause confusion. |
This didn't work for all cases. I'll work on better solution for next release. #351
|
Proper solution has been found for v1: https://github.com/reagent-project/reagent/blob/master/examples/material-ui/src/example/core.cljs |
To implement proper on-update function for React input wrapper components, reference to the real component is probably needed.
Discussion at madvas/cljs-react-material-ui#17
Example at https://github.com/Deraen/problems/blob/reagent-material-ui-text-field/src/hello_world/core.cljs#L16