This PR fixes a problem where if the user collapsed and expanded the same menu a couple times, the app will crash out of memory.
That was happening because multiple events were getting attached to the same component recursively.
The fix also helped the already collapsed submenus to keep being collapsed when parent container gets opened again (for example, guardianSignatures was always showing up when the 'vaa' field was expanded, and its a giant object which is usually not looked at)
Description
This PR fixes a problem where if the user collapsed and expanded the same menu a couple times, the app will crash out of memory.
That was happening because multiple events were getting attached to the same component recursively.
The fix also helped the already collapsed submenus to keep being collapsed when parent container gets opened again (for example, guardianSignatures was always showing up when the 'vaa' field was expanded, and its a giant object which is usually not looked at)