mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Sort labels alphabetically on the labels popup
This commit is contained in:
parent
296813e773
commit
cbfecca505
1 changed files with 7 additions and 3 deletions
|
|
@ -285,9 +285,13 @@ export function SetLabelsControl(props: SetLabelsControlProps): JSX.Element {
|
|||
if (!labels) {
|
||||
return []
|
||||
}
|
||||
return labels.filter((label) => {
|
||||
return label.name.toLowerCase().includes(filterText.toLowerCase())
|
||||
})
|
||||
return labels
|
||||
.filter((label) => {
|
||||
return label.name.toLowerCase().includes(filterText.toLowerCase())
|
||||
})
|
||||
.sort((left: Label, right: Label) => {
|
||||
return left.name.localeCompare(right.name)
|
||||
})
|
||||
}, [labels, filterText])
|
||||
|
||||
// Move focus through the labels list on tab or arrow up/down keys
|
||||
|
|
|
|||
Loading…
Reference in a new issue