Skip to content

CountryField flags change to UKNOWN when setting Alpha3 format #4122

@ghost

Description

Describe the bug
I created a CountryField in my CrudController and want to use the Alpha3 format, but when I set it, in the New and Edit Form, all the flags are shown as UNKNOWN, even in the HTML code.
If I use the default Alpha2 format, the flags are shown normally.

In the Index and Detail pages, the flags are shown properly when using both Alpha3 and Alpha2.

To Reproduce
EasyAdmin version: 3.2.1

@MyCrudController
public function configureFields(string $pageName): iterable
{
    $country = CountryField::new('country')
        ->setCustomOption(CountryField::OPTION_COUNTRY_CODE_FORMAT, CountryField::FORMAT_ISO_3166_ALPHA3)
    ;
    return [$country];
}

Additional context
When using the Alpha3 format:
image

image

When using the Alpha2 format:
image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueIdeal for your first contribution! (some experience with this bundle may be required)help wantedIssues and PRs which are looking for volunteers to complete them.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions