Search code examples
iosswiftswift2eureka-forms

Eureka Forms Library responding to a row's textfield finishing editing?


We are evaluating Eureka Forms, and have created a simple form with a couple FieldRows. I see how you can get all the values out of a form, and how you can respond when any row is changed at all using onChange() (on a character by character basis) but it is not obvious to me how one responds to a field's editing finishing completely, rather than as each character is typed.

In a normal textfield, we could set the view controller or the cell of a tableview to be the textfield's delegate and respond to textField:didFinishEditing: and handle it there.

How does one do that with a Eureka Forms field row?

Thanks


Solution

  • You can use the onCellUnHighlight callback, just like the onChange. The OnCellUnHighlight gets called when the row resigns firstResponder which is when you stop editing.

    Note: Because of the default implementation you may have to define onCellHighlight as well because it will override your onCellUnHighlight if you do not.