Answer the question
In order to leave comments, you need to log in
How to close filters on momo click in React?
Implemented filters that unfold on click, close on the second. However, it is necessary that the filter closes when clicking on any other area of the page, tell me the best way to implement it
Answer the question
In order to leave comments, you need to log in
https://codesandbox.io/s/jv7p4xj87v
I do not pretend to the correct organization of states and other things. Obviously openSection should not be stored in OutsideClicked and stuff. The main thing is that it is clear how to do what you asked
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question