Answer the question
In order to leave comments, you need to log in
How to control the state of a component in a table(container) in React-Redux?
I have a container, for example:
The question is this: Each Component that I render in a loop in the container is a table row that, when clicked, works like a BS3 accordion. So, how to track clicks on each of the elements in the table through the store so that it opens? Code examples would be welcome, thanks.
Answer the question
In order to leave comments, you need to log in
If I understand the question correctly, then something like this:
handleComponentClick = (id) => {
// тут можно дернуть экшн, чтобы открыть строку таблицы
}
...
this.jquerylist.map(el => {
<Component key={el.id} onClick={() => this.handleComponentClick(el.id)}/>
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question