Enhancement: Sort labels (#1995)

This commit is contained in:
Muhsin Keloth 2021-03-26 17:20:38 +05:30 committed by GitHub
parent a0cd1f8bcc
commit ff69ef7317
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,14 +87,18 @@ export default {
}, },
computed: { computed: {
activeList() { activeList() {
return this.accountLabels.filter(accountLabel => return this.accountLabels
this.savedLabels.includes(accountLabel.title) .filter(accountLabel => this.savedLabels.includes(accountLabel.title))
); .sort((a, b) => {
return a.title.localeCompare(b.title);
});
}, },
inactiveList() { inactiveList() {
return this.accountLabels.filter( return this.accountLabels
accountLabel => !this.savedLabels.includes(accountLabel.title) .filter(accountLabel => !this.savedLabels.includes(accountLabel.title))
); .sort((a, b) => {
return a.title.localeCompare(b.title);
});
}, },
}, },
methods: { methods: {