This is a row of my table, each of them has an onclick event. Clicking on the select calls that event which it shouldn't do. How can I do so that if it is clicked on the select, it opens the select and if it is clicked outside the select it triggers the event
The click event is raised on the element that is clicked with the mouse and propagates up, raising to all elements above it in the DOM tree.
To avoid this, catch the event in the element
select
and use the methodstopPropagation
to stop the propagation of the event: