M
M
mr_drinkens2017-05-18 15:50:13
React
mr_drinkens, 2017-05-18 15:50:13

How to close all popovers and inputs?

Hello.
The application has several lists and various popovers (menus). Also, when you select the "edit" menu, input appears.
For example, we click on the menu - a popover pops up.
How to make it so that when you click "outside" this list (element) or when you click on the menu of the next element, all popovers are automatically closed? Create an isShowing variable in the state, and change the state every time you click through the reducer?
Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KnightForce, 2017-05-18
@mr_drinkens

You can.)
Here, in any store. It is possible to have the state of a higher component and manipulate the descendants, but in order not to fence this, they came up with Redux.)
Or like this:
In the store, define isShowing and in the state of the inputs pass through the context.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question