in React project component click event is PARTLY triggered when clicked

10 Views Asked by At

I´m working on a react project where I have a dropdown select to choose options, each option has some padding, and a onClick to trigger a onSelect function to select the item and close the dropdown list.

The problem is when I do click on the content of the option (the text), the fuction works well,but if I click on the padding area of the option, the function will only be triggered partly (close the dropdown list but not selecting the item clicked).

Can´t provide code because the project is not personal.

Someone help me please and thanks!

Expecting to make the function onSelect work well either clicking on the text area or the padding area.

0

There are 0 best solutions below