Skip to content

Improve SwiftUI usage #52

@Alex009

Description

@Alex009

here snippet with useful api:

struct Binder {
  static func binding(field: FormField<NSString, StringDesc>) -> Binding<String> {
    return Binding(
      get: { String(field.data.value ?? "") },
      set: { field.setValue(value: ($0 as NSString)) }
    }
  }
}

but in this case we not receive updated of FormField on UI. works only UI -> FormField updates. FormField -> UI updated not implemented

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions