swift3 - iOS eureka-forms LabelRow hidden condition not evaluating -


setup

  • swift 3.1
  • ios 10.0
  • eureka 3.0

problem

can not make labelrow hide textarearow hidden state. label defined before adding both section. gets added on top of text.

code

after few different ways define condition, when debugging, seems function not getting called. in first 2 gets called once, not when textarearow changes hide or show

    let switchrowtag = "switchrowtag"     form +++ section         <<< switchrow(switchrowtag) { row in             row.title = "select me"}      // test hiding functions ========================     let tag = "textarea"     let title = "test hiding"     let labeltag = "\(tag)_label"     let textarea = textarearow(tag) {         $0.title = title         $0.tag = tag         $0.placeholder = title         $0.textareaheight = .dynamic(initialtextviewheight: 110)         $0.hidden = condition.predicate(nspredicate(format: "$\(switchrowtag) == false"))     }     let labelrow = labelrow(labeltag) {         $0.title = title         $0.tag = labeltag         /* try setting function after adding section         $0.hidden = condition.function([tag], { form in             if let textrow = form.rowby(tag: tag) as? textarearow {                 return textrow.ishidden             } else {                 return false             }         })          */     }      section <<< labelrow <<< textarea     // never evaluated     /*     labelrow.hidden = condition.function([tag], { form in         if let textrow = form.rowby(tag: tag) as? textarearow {             return textrow.ishidden         } else {             return false         }     })      */     if let labelrow = form.rowby(tag: labeltag) as? labelrow {         labelrow.hidden = condition.function([tag], { form in             if let textrow = form.rowby(tag: tag) as? textarearow {                 return textrow.ishidden             } else {                 return false             }         })     } 

it not supported.

eureka supports reevaluating hidden conditions, when row related tag depended upon has change of value only. not change of visibility (ref).


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -