Z
Z
zwezew2019-03-19 16:35:26
React
zwezew, 2019-03-19 16:35:26

React - is it possible to disable an event on a component's children?

Is it possible to disable the event on the descendants of the component so that onClick only fires on the block in which it is written?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-03-19
@zwezew

Compare target and currentTarget. If they are different, do nothing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question