You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the Accordion to display a list of items, and when I click on an item to expand it the body is a form that allows the user to edit that item. Each form has a 'cancel edit' button that I want to collapse the expanded form.
From my console.log statements, it looks as if when I call my resetItemsState function, my component is getting re-rendered, and all items have the isActive field set to false, so I'd expect that the element collapses, but unfortunately it seems to be remaining expanded.
I'm trying to use the Accordion to display a list of items, and when I click on an item to expand it the body is a form that allows the user to edit that item. Each form has a 'cancel edit' button that I want to collapse the expanded form.
From my console.log statements, it looks as if when I call my
resetItemsState
function, my component is getting re-rendered, and all items have theisActive
field set tofalse
, so I'd expect that the element collapses, but unfortunately it seems to be remaining expanded.The relevant part of my
ItemForm
component is the buttonThe text was updated successfully, but these errors were encountered: