mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Team names in system console are sorted alphabetically regardless of case (#3958)
This commit is contained in:
committed by
Christopher Speller
parent
e557f42673
commit
b8d6eba788
@@ -25,10 +25,13 @@ export default class SelectTeamModal extends React.Component {
|
||||
this.props.onModalDismissed();
|
||||
}
|
||||
compare(a, b) {
|
||||
if (a.display_name < b.display_name) {
|
||||
const teamA = a.display_name.toLowerCase();
|
||||
const teamB = b.display_name.toLowerCase();
|
||||
|
||||
if (teamA < teamB) {
|
||||
return -1;
|
||||
}
|
||||
if (a.display_name > b.display_name) {
|
||||
if (teamA > teamB) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user