Disclosure Layout can't be used properly when prop animated is set as true
Store Framework
•
ID: 417947
No Fix
Published on4/19/2022
•
Last updated on7/1/2024
1 min read
Summary
There is an issue in disclosure layout that is only triggering the block to show, but it's not closing. This is caused by prop animated, that is not working properly when set in disclosure layout and doesn't allow to hide the element after opening.
Simulation
Go to any store using disclosure-layout with prop animated as true. Try to show and hide the element.
The content can't be hidden.
Workaround
Add the following handle in styles, this should avoid the issue in animation because the class is being changed:
.vtex-disclosure-layout-1-x-content--search-description-content--hidden {display: none;}