Corretto ordine alfabetico delle province

This commit is contained in:
Luca Vandro 2020-09-17 13:00:19 +02:00
parent 9e15d4a82b
commit 120917d8d8
5 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -51,7 +51,8 @@ export function birthplaceFields (provinceSelector, birthplaceSelector) {
optGroupEE.label = '-----------'
provinceSelect.appendChild(optGroupProv)
provinceSelect.appendChild(optGroupEE)
Object.keys(PROVINCE).forEach((code, i) => {
Object.keys(PROVINCE).sort(function(a,b){return PROVINCE[a]-PROVINCE[b]}).forEach((code, i) => {
const name = PROVINCE[code]
const option = document.createElement('option')
option.value = code