reactjs / react-autocomplete

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

How not to close Menu on value change #292

Closed LekovicMilos closed 6 years ago

LekovicMilos commented 6 years ago

Hi guys!

I want to change the value of the autocomplete as highlight items in the menu. The problem is- menu closes when I change the value because it rerenders. Can I keep the menu opened while I am changing the value of the input? I tried with open: true, but it still closes itself.

LekovicMilos commented 6 years ago

Interesting thing: open stays true, but still menu closes itself.

CMTegner commented 6 years ago

Hi Milos! You can use props.open to force the menu to stay open. I read through #291 and I understand what you're trying to achieve. I'm going to keep it in the back of my head for v2 to see if there's a way to incorporate the logic into Autocomplete itself. We had something similar earlier were the highlighted item would autocomplete inline when you navigate the list, but removed it due to a a couple of different technical limitations.