Skip to content

Commit

Permalink
fix: removed groupings in timezone picker
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Morales <[email protected]>
  • Loading branch information
emoral435 committed Jan 24, 2024
1 parent cfbb197 commit c00d9be
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/NcTimezonePicker/NcTimezonePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,22 @@ export default {
/**
* Since NcSelect does not support groups,
* we create an object with the grouped timezones and continent labels.
*
* NOTE for now we are removing the grouping from the fields to fix an accessibility issue
* in the future, other options can be introduced to better display the different continents,
* regions, and cities within the regions etc.
*/
let timezonesGrouped = []
Object.values(timezoneList).forEach(group => {
// Add an entry as group label
timezonesGrouped.push({
label: group.continent,
timezoneId: `tz-group__${group.continent}`,
regions: group.regions,
})
// timezonesGrouped.push({
// label: group.continent,
// timezoneId: `tz-group__${group.continent}`,
// regions: group.regions,
// })
timezonesGrouped = timezonesGrouped.concat(group.regions)
})
console.log(timezonesGrouped)
return timezonesGrouped
},
},
Expand Down

0 comments on commit c00d9be

Please sign in to comment.