Eureka: Conditional disabling of DateInlineRow doesn't work

Created on 12 Jan 2016  Â·  2Comments  Â·  Source: xmartlabs/Eureka

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.

Hiding & Disabling Rows question

Most helpful comment

@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

All 2 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

allanrojas picture allanrojas  Â·  3Comments

zoul picture zoul  Â·  3Comments

thlbaut picture thlbaut  Â·  3Comments

Tomas1405 picture Tomas1405  Â·  3Comments

tc picture tc  Â·  3Comments