Search code examples
swift4eureka-forms

Eureka inline picker row select first row


When I expand the PickerInlineRow, I want to be able to select the first option. For cases where there is only one option, I cannot call the onChange method so it can never be picked.enter image description here


Solution

  • This is a hack.. But I select the first row by setting the row value = the first element in the array on the network callback.

      if let row = self.form.rowBy(tag: "Row") as? PickerInlineRow<RowType> {
        row.value = rowTypes.first
        row.reload()
      }