diff --git a/MVMCoreUI/BaseControllers/ThreeLayerTableViewController.swift b/MVMCoreUI/BaseControllers/ThreeLayerTableViewController.swift index d7c60545..4bd889bd 100644 --- a/MVMCoreUI/BaseControllers/ThreeLayerTableViewController.swift +++ b/MVMCoreUI/BaseControllers/ThreeLayerTableViewController.swift @@ -52,18 +52,20 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController, Rotor bottomView.updateView(width) showFooter(width) } - tableView.reloadData() + tableView.visibleCells.forEach { cell in + (cell as? MVMCoreViewProtocol)?.updateView(width) + } } open override func updateUI(for molecules: [MoleculeModelProtocol]? = nil) { - let isFirstRender = self.isFirstRender super.updateUI(for: molecules) guard molecules == nil else { return } createViewForTableHeader() createViewForTableFooter() - // Reloading the table is handled in updateViews. + // Reloading the table is handled in updateViews, however, update views is on a separate rendering task than the current thread. The table render needs to be bound and settled to the new model before others put in additional update requests. + tableView.reloadData() } override open func viewDidLoad() {