Corretto ordinamento delle province

This commit is contained in:
Luca Vandro 2020-09-17 13:22:23 +02:00
parent 120917d8d8
commit d4e01a476a
6 changed files with 6 additions and 7 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

File diff suppressed because one or more lines are too long

View File

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