reactjs / react-autocomplete

WAI-ARIA compliant React autocomplete (combobox) component
MIT License
2.17k stars 532 forks source link

Getting the ref object #342

Closed jlejoux closed 6 years ago

jlejoux commented 6 years ago

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 commented 6 years ago

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

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