How to expand One Grid Row Only at a Time with React, the behavior needed is that all the rows will be collapsed when i expand a row.
I found a solution with jquery but not in React.
Thank you in advance.
The expanded state of the details is part of the data.I can suggest on the onExpandChange event to set the expanded state to expanded on the currently clicked detail and set the expanded field to false to all other items.I made an example showcasing this:https://stackblitz.com/edit/react-fmmump?file=app/main.jsxI hope this is helpful.
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).