NouanceLabs / payload-better-fields-plugin

This plugin aims to provide you with very specific and improved fields for the Payload admin panel.
MIT License
124 stars 2 forks source link

TelephoneField does not accept defaultCountry GB #34

Closed tyteen4a03 closed 8 months ago

tyteen4a03 commented 8 months ago

For some reason this causes an error in the admin UI:

        ...TelephoneField(
            {
                name: "contactPhoneNumber",
                label: "Default Contact Person Phone Number",
                admin: {
                    placeholder: "+44 123 456 7890",
                },
            },
            {
                defaultCountry: "gb", // this is the line
            },
        ),
Country not found: gb 
PhoneNumberInput_@http://localhost:3000/admin/main.js:286211:20
tyteen4a03 commented 8 months ago

I found the issue: defaultCountry is case-sensitive 🤦

paulpopus commented 8 months ago

Closing as this is not a bug or an issue with the plugin