You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<<< DecimalRow() {
//set current value and placeholder
$0.title = "Weight"
$0.placeholder = "Pounds"
let weight: String? = Member.currentMemberInContext(nil)?.weight
if let uWeight = weight {
$0.value = Float(uWeight)
}
}.onCellUnHighlight({ (cell, row) -> () in
//save value to server
})
But the onCellUnHighlight callback is never called when the decimal row resigns first responder.
The onChange callback works alright, but I'd rather not make a network call every time a character is changed.
The text was updated successfully, but these errors were encountered:
Hi, this is because currently the onCellHighlight overrides the onCellUnHighlight. Look at how the DecimalRow is defined. In fact most of the rows are defined like this.
public final class DecimalRow: _DecimalRow, RowType {
required public init(tag: String?) {
super.init(tag: tag)
onCellHighlight { cell, row in
let color = cell.textLabel?.textColor
row.onCellUnHighlight { cell, _ in
cell.textLabel?.textColor = color
}
cell.textLabel?.textColor = cell.tintColor
}
}
}
So if you want to use the 'unhighlight' callback you must override the onCellHighlight as well.
I have the following:
But the onCellUnHighlight callback is never called when the decimal row resigns first responder.
The onChange callback works alright, but I'd rather not make a network call every time a character is changed.
The text was updated successfully, but these errors were encountered: