Eureka: Can't disable ButtonRow on onChange() event of other row

Created on 12 Jul 2016  路  2Comments  路  Source: xmartlabs/Eureka

Im trying to disable a ButtonRow on the onChange() event that ocurrs in other row like this:

}.onChange { row in

                //let servicePayment = self.servicePaymentRates.filter{ $0.description == row.value }.first
                let servicePayment = row.value

                if(servicePayment != nil){
                    // set if the service selected is for facility or provider
                    self.isFacility = (servicePayment?.isFacility)!

                    let providerRow = self.form.rowByTag(String(self.serviceAuthIndex) + "_provider") as! ButtonRow


                    if(servicePayment?.servicePaymentCode == "PASIS"){
                        providerRow.disabled = true
                        providerRow.section?.reload()
                    }


                }

And it doesn't work. Any clue?

Thanks

awaiting response

Most helpful comment

I solve it by call row.evaluateDisabled()after row.disabled = true

All 2 comments

I solve it by call row.evaluateDisabled()after row.disabled = true

@alexvazquez did that solution solve your problem?

Was this page helpful?
0 / 5 - 0 ratings