jquense / uncontrollable

Wrap a controlled react component, to allow specific prop/handler pairs to be uncontrolled
MIT License
200 stars 35 forks source link

Question! #6

Closed thealjey closed 9 years ago

thealjey commented 9 years ago

How do I get a reference to the original component? this.refs contains an instance of uncontrollable, what I want is to somehow get a hold of a component that it wraps

jquense commented 9 years ago

I was going to point you to an undocumented feature, when I realized that it wasn't in the code base! So thanks for inadvertently letting me know about that.

I have fixed and released the missing feature in 3.1.2, you can provide a lsit of methods you want to "just work" (see the readme) or if that doesn't suit your needs you reach in and access the ref like this.refs.uncontrolledThing.refs.inner