moroshko / react-autosuggest

WAI-ARIA compliant React autosuggest component

Home Page:http://react-autosuggest.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not close Suggestion when button/icon click

monski opened this issue · comments

Hi guys, just wanted some help.

is there a way i can make it like, when i click the button on my custom render suggestion.. the suggestion should not close, and just remove it from list.

  • Provide the steps to reproduce the issue, e.g.:

    1. Focus on the input field
    2. Type test, and wait for suggestions to appear
    3. click on the button icon (left side)

    Observed behaviour: Suggestions closed

    Expected behaviour: Suggestions stay open

sample image

Screen Shot 2021-10-23 at 4 01 34 PM

thanks in advance

nvm i figured it out..just missing some e.stopPropagation() in button click..thanks

@monski can you please elaborate how you did this ? With a codepen link for example if you don't mind. I'm trying to build the same thing as on your screenshot

EDIT: never mind. I understood how. My problem is I wasn't adding an actual button, I was only adding an icon which I expected to behave like a clickable button