Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Source/Core/BaseRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
13 changes: 13 additions & 0 deletions Source/Core/Section.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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){}
Expand All @@ -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) {
Expand Down Expand Up @@ -284,6 +293,10 @@ extension Section /* Condition */{
for row in kvoWrapper._allRows {
row.wasAddedToFormInSection(self)
}

for row in kvoWrapper._allRows {
row.updateRowInSection()
}
}

/**
Expand Down