Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Sort Library Manager list alphabetically #1726

Open
2bam opened this issue Mar 26, 2024 · 1 comment
Open

Sort Library Manager list alphabetically #1726

2bam opened this issue Mar 26, 2024 · 1 comment

Comments

@2bam
Copy link

2bam commented Mar 26, 2024

I'm trying to find the "MQTT" library on the Library Manager list.

But I have 109 libraries matching.

With the list being unsorted it makes it really hard to locate the one with exact name "MQTT".
Other short named libraries have this problem, like LittleFS.

"MQTT" of course matches a lot of libraries, but that's the exact name of the library I want to add.
I cannot even text search (Menu: Edit->Find) on the custom webview.

It's probably a one line fix that will spare me from (worst case) going over half a hundred items.

Thanks

@2bam
Copy link
Author

2bam commented Mar 26, 2024

If right after this

const filteredLibraries = this.props.libraries.filter((element) => {

you add

filteredLibraries.sort((a,b)=>a.name.localeCompare(b.name));

That would be it!

Same for boards:

Here

Add

filteredPlatforms.sort((a,b)=>a.name.localeCompare(b.name));

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

No branches or pull requests

1 participant