How to use country-region-data - 2 common examples

To help you get started, we’ve selected a few country-region-data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linode / manager / packages / manager / src / features / Billing / BillingPanels / UpdateContactInformationPanel / UpdateContactInformationPanel.tsx View on Github external
'country',
        'company',
        'email',
        'first_name',
        'last_name',
        'phone',
        'state',
        'tax_id',
        'zip'
      ],
      accountError.update
    );

    const generalError = errorMap.none;

    const countryResults: Item<string>[] = countryData.map(
      (country: Country) => {
        return {
          value: country.countryShortCode,
          label: country.countryName
        };
      }
    );

    // const currentCountryResult = countryData.filter((country: Country) =>
    //   fields.country
    //     ? country.countryShortCode === fields.country
    //     : country.countryShortCode === account.country
    // );

    // const countryRegions: Region[] = pathOr(
    //   [],
github xyfir / accownt / client / components / dashboard / user / services / View.jsx View on Github external
menuItems={crd}
                itemLabel="countryName"
                itemValue="countryShortCode"
                defaultValue={form.country}
              />
            </Conditional>

            <Conditional show={!this._isDisabled('region')}>
              <SelectField
                fullWidth
                id="select-region"
                ref="region"
                label="State/Province/Region"
                menuItems={
                  (
                    crd.find(c => c.countryShortCode == this.state.country) || {
                      regions: []
                    }
                  ).regions
                }
                itemLabel="name"
                itemValue="shortCode"
                defaultValue={form.region}
              />
            </Conditional>

            <Conditional show={!this._isDisabled('address')}>
              <TextField
                id="text--address"
                ref="address"
                type="text"
                label="Address"

country-region-data

List of countries, regions, and their short-codes.

MIT
Latest version published 4 months ago

Package Health Score

73 / 100
Full package analysis

Popular country-region-data functions