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

It is not selecting a place on click while it works perfectly from keyboard

Open sameersyd opened this issue 3 years ago • 4 comments

I cant seem to make it work with a click on the place. It works perfectly if i navigate with the arrow keys and select with enter key. Even the live demo does not work with a click. Has anyone else faced this issue?

This is a #26 issue. It shows as closed but I'm again getting the same bug. https://github.com/hibiken/react-places-autocomplete/issues/26

sameersyd avatar Sep 11 '20 16:09 sameersyd

I, too, am experiencing this. Enter works but clicking just clears the options. Any suggestions? Thank you.

SawyerOG avatar Oct 17 '20 16:10 SawyerOG

I, too, am experiencing this. Enter works but clicking just clears the options. Any suggestions? Thank you.

The developer has discontinued supporting the library. A workaround for it would be, adding an onClick on the getSuggestionItemProps and passing the suggestion to handleClick method

Screenshot 2020-10-18 at 1 18 11 AM

And the handleClick method would look like below,

Screenshot 2020-10-18 at 1 17 33 AM

sameersyd avatar Oct 17 '20 19:10 sameersyd

Thank you! I have it working. I appreciate this very much.

SawyerOG avatar Oct 18 '20 15:10 SawyerOG

Are there any other workarounds? This didn't work for me

joao-salgado avatar Mar 23 '23 18:03 joao-salgado