Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Sort select list by country

Terry Sutton0a876f5d4988
diff --git a/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsx b/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsx
index 07403485112..7c2a070429f 100644
--- a/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsx
+++ b/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsx
@@ -230,11 +230,13 @@ const TaxID: FC<Props> = ({ loading, taxIds, onTaxIdsUpdated }) => {
onChange={(e: any) => onUpdateTaxId(taxId.id, 'name', e.target.value)}
disabled={!canUpdateTaxIds}
>
- {TAX_IDS.map((option) => (
- <Select.Option key={option.name} value={option.name}>
- {option.country} - {option.name}
- </Select.Option>
- ))}
+ {TAX_IDS.sort((a, b) => a.country.localeCompare(b.country)).map(
+ (option) => (
+ <Select.Option key={option.name} value={option.name}>
+ {option.country} - {option.name}
+ </Select.Option>
+ )
+ )}
</Select>
<Input
value={taxId.value}