diff --git a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift index 1af1a85a..fe30288a 100644 --- a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift +++ b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift @@ -202,7 +202,21 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol } open func newData(for molecule: MoleculeModelProtocol) { - //TODO: expand for header, navigation, etc + + if let headerMolecule = molecule as? MoleculeHeaderModel { + //If complete header replaced then it makes sense to add this + /*createViewForTableHeader() + let width = view.bounds.width + if let topView = topView as? MVMCoreViewProtocol { + topView.updateView(width) + showHeader(width) + }*/ + //Just update is happening only on the existing molecules. ex. changing the title, action etc.. + (topView as? MoleculeViewProtocol)?.set(with: headerMolecule, delegateObject() as? MVMCoreUIDelegateObject, nil) + return + } + + //TODO: expand for navigation, etc guard let moleculesInfo = moleculesInfo else { return } let indicies = moleculesInfo.indices.filter({ index -> Bool in