Skip to content

Keep reference to real synthetic input component#351

Closed
Deraen wants to merge 1 commit intomasterfrom
synthetic-input-ref
Closed

Keep reference to real synthetic input component#351
Deraen wants to merge 1 commit intomasterfrom
synthetic-input-ref

Conversation

@Deraen
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Deraen commented Jun 17, 2018

@Deraen Deraen closed this Jun 17, 2018
@Deraen Deraen deleted the synthetic-input-ref branch June 24, 2025 11:03
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.

1 participant