Added keepExpanded property to retain the animation ending state