Skip to content

Commit

Permalink
Reset the scroll position every time data changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
twstokes committed May 31, 2022
1 parent b83a832 commit 339b8b3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ class SiteDesignContentCollectionViewController: CollapsableHeaderViewController

private var sections: [SiteDesignSection] = [] {
didSet {
if oldValue.isEmpty {
scrollableView.setContentOffset(.zero, animated: false)
}
scrollableView.setContentOffset(.zero, animated: false)
contentSizeWillChange()
tableView.reloadData()
}
Expand Down

0 comments on commit 339b8b3

Please sign in to comment.