Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tree-view] Use common comparator function by sort methods #1195

Open
wants to merge 1 commit into
base: updated-latest-electron
Choose a base branch
from

Conversation

asiloisad
Copy link
Contributor

The sorting methods of getEntries and sortEntries have used a different approach. Now:

  • They use the same approach,
  • Intl.Collator is created once instead of every getEntries call.
  • normalizeEntryName is simplified.

}
return normalizedValue
normalizeEntryName(value) {
return value.name ? value.name : value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not need to convert to lowercase? Does Intl.Collator take care of that for us?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants