This PR adds fixes an issue with the collapsible views where they would not render content properly when their initial collapsed state was true and the didChangeViewModel() function was called during the initial rendering of the view.
To fix this issue, we change the view model's isCollapsed property to make it only the initial state and handle the current view state in the view itself.
This also means that any changes to the collapsed state are no longer propagated via the view model's properties, but instead only through the existing didChangeCollapsibleState closure.
This PR also makes the UIView.animate in the collapsible view optional altogether to add the option to work around issues like this in the future.
This PR adds fixes an issue with the collapsible views where they would not render content properly when their initial collapsed state was
true
and thedidChangeViewModel()
function was called during the initial rendering of the view. To fix this issue, we change the view model'sisCollapsed
property to make it only the initial state and handle the current view state in the view itself. This also means that any changes to the collapsed state are no longer propagated via the view model's properties, but instead only through the existingdidChangeCollapsibleState
closure.This PR also makes the
UIView.animate
in the collapsible view optional altogether to add the option to work around issues like this in the future.