I'm doing :
form +++
Section(header: "GENERAL", footer: "")
<<< TextFloatLabelRow("row1") {
$0.title = "Nom"
$0.disabled = true
}.cellUpdate{cell, row in
cell.textField.enabled = self.isEditable!
}
<<< DateInlineRow("row4") {
$0.title = "Date d'anniversaire"
$0.disabled = Condition.Function(["row1"]) { form in
if let row : TextFloatLabelRow = form.rowByTag("row1") {
return !row.isDisabled
}
return false
}
}
But I can't get the condition to be activated.
@Geeo
Disabled function is automatically evaluated only when a dependent row value changes. In your particular case eureka checks automatically if row4 whenever row1 value changes.
To force the evaluation of the disabled condition you can invoke row's .evaluateDisabled() as this
FAQ question point out: https://github.com/xmartlabs/Eureka#row-does-not-update-after-changing-hidden-or-disabled-condition
Similar issues #48, #10
Regards
Thanks a lot for help !
On 19 Jan 2016, at 00:05, Martin Barreto [email protected] wrote:
@Geeo https://github.com/Geeo
Disabled function is automatically evaluated only when a dependent row value changes. In your particular case eureka checks automatically if row4 whenever row1 value changes.
To force the evaluation of the disabled condition you can invoke row's .evaluateDisabled() as this
FAQ question point out: https://github.com/xmartlabs/Eureka#row-does-not-update-after-changing-hidden-or-disabled-condition https://github.com/xmartlabs/Eureka#row-does-not-update-after-changing-hidden-or-disabled-condition
Similar issues #48 https://github.com/xmartlabs/Eureka/issues/48, #10 https://github.com/xmartlabs/Eureka/issues/10
Regards—
Reply to this email directly or view it on GitHub https://github.com/xmartlabs/Eureka/issues/177#issuecomment-172677147.
Most helpful comment
@Geeo
Disabled function is automatically evaluated only when a dependent row value changes. In your particular case eureka checks automatically if
row4wheneverrow1value changes.To force the evaluation of the disabled condition you can invoke row's
.evaluateDisabled()as thisFAQ question point out: https://github.com/xmartlabs/Eureka#row-does-not-update-after-changing-hidden-or-disabled-condition
Similar issues #48, #10
Regards