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

Adding 2 different sections in the suggestions list, that trigger 2 different handlers

Open harvey56 opened this issue 2 years ago • 0 comments

Are you reporting a bug?

Not a bug

Are you making a feature request?

This is a potential feature request if that feature is not available.

In my render suggestions menu, I have a list of suggestions. For each suggestion, I have a name that describes that suggestion, and on the right of the suggestion, a "+".

I would like to achieve the following :

  • if I click on the suggestion name, it triggers a specific event handler (ex: fetch some data to render a component).
  • if I click on the "+", it triggers a different event handler (ex: add the suggestion to a table), and the list of suggestions remains open to give the ability to add other suggestions with other "+".

Can this be achieved ?

harvey56 avatar Nov 28 '21 17:11 harvey56