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

Keep reference to real synthetic input component #351

Closed
wants to merge 1 commit into from

Conversation

Deraen
Copy link
Member

@Deraen Deraen commented Mar 12, 2018

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

@Deraen
Copy link
Member Author

Deraen commented Apr 4, 2018

I've been looking to finalizing this, but seems like this approach can't work with material-ui 1.0 as ref can't be used with new TextField which is implemented as Functional Stateless Component. This means it is impossible to get access to the React component.

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.

@Deraen Deraen added the blocked label Apr 11, 2018
@Deraen Deraen removed this from the 0.8.0 milestone Apr 11, 2018
Deraen added a commit that referenced this pull request Apr 11, 2018
This didn't work for all cases. I'll work on better solution for next
release.

#351
@Deraen
Copy link
Member Author

Deraen commented Jun 17, 2018

@Deraen Deraen closed this Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant