Skip to content

Improving Config support with SwiftUI Integration #30

@ucotta-at-wwm

Description

@ucotta-at-wwm

Since I have several country fields in my form (for mobile, country of passport, user address, etc.), it doesn't make sense to configure these values on a singleton. Every field has its own settings (title, for example, showing phone code, etc.), and all are created at the same time. I think it would be a better idea to support "config" as a parameter that can be set in the UIViewControllerRepresentable struct that you offer as an example:

struct CountryPicker: UIViewControllerRepresentable {
    [...]
    @Binding var country: Country?
    var config: Configuration?

Alternatively, we could allow setting these values directly in the CountryPickerViewController, like selectedCountry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions