diff --git a/Source/Core/BaseRow.swift b/Source/Core/BaseRow.swift index 105f8cc57..58c780421 100644 --- a/Source/Core/BaseRow.swift +++ b/Source/Core/BaseRow.swift @@ -147,6 +147,9 @@ extension BaseRow { self.section?.form?.rowsByTag[t] = self self.section?.form?.tagToValues[t] = baseValue as? AnyObject ?? NSNull() } + } + + final func updateRowInSection() { addToRowObservers() evaluateHidden() evaluateDisabled() diff --git a/Source/Core/Section.swift b/Source/Core/Section.swift index 64f44cff5..a020a3075 100644 --- a/Source/Core/Section.swift +++ b/Source/Core/Section.swift @@ -203,6 +203,7 @@ extension Section : RangeReplaceableCollectionType { kvoWrapper.rows.insertObject(formRow, atIndex: kvoWrapper.rows.count) kvoWrapper._allRows.append(formRow) formRow.wasAddedToFormInSection(self) + formRow.updateRowInSection() } public func appendContentsOf<S : SequenceType where S.Generator.Element == BaseRow>(newElements: S) { @@ -211,6 +212,10 @@ extension Section : RangeReplaceableCollectionType { for row in newElements{ row.wasAddedToFormInSection(self) } + + for row in newElements { + row.updateRowInSection() + } } public func reserveCapacity(n: Int){} @@ -228,6 +233,10 @@ extension Section : RangeReplaceableCollectionType { for row in newElements{ row.wasAddedToFormInSection(self) } + + for row in newElements { + row.updateRowInSection() + } } public func removeAll(keepCapacity keepCapacity: Bool = false) { @@ -284,6 +293,10 @@ extension Section /* Condition */{ for row in kvoWrapper._allRows { row.wasAddedToFormInSection(self) } + + for row in kvoWrapper._allRows { + row.updateRowInSection() + } } /**