react-autocomplete icon indicating copy to clipboard operation
react-autocomplete copied to clipboard

Getting the ref object

Open jlejoux opened this issue 8 years ago • 1 comments

Hi!

Does someone know how to use the input ref?

Because if I understood correctly, when setting a renderInput we need to pass the given ref object to that input, meaning that I can't set a ref to my component.

Is there a way around this?

Thx!

jlejoux avatar Jun 06 '18 16:06 jlejoux

In case you have the same issue I did it with this:

ref={el => {
    props.ref(el);
    this._input = el;
}}

jlejoux avatar Jun 06 '18 16:06 jlejoux