thomasbrueggemann / paperless-desktop

🍃 macOS app that uses the paperless API to manage your document scans.
GNU General Public License v3.0
583 stars 52 forks source link

Sort Tags alphabetically #35

Closed nterhoeven closed 6 years ago

nterhoeven commented 6 years ago

Issue

By default, the tag list is sorted in the order the tags are created. I would like to change this behavior to sort the list alphabetically or by color.

My wish

The optimal solution (from my perspective) would be to have alphabetical sorting in the side bar of the "Documents" overview page and custom sorting on the "Tags" page (by clicking the header line).

Workaround

Workaround that sorts the Tag list alphabetically: When loading the Tag list via the paperless API, it is possible to change the order. Add ?ordering=name to line 22 in js/src/actions/TagsActions.js:

 getTags() {
                const url = localStorage.getItem("settings.host") + "/api/tags/?ordering=name";
thomasbrueggemann commented 6 years ago

@nterhoeven Good idea, thanks for the input! Feel free to open a small pull-request. Otherwise I'll add this, next time I touch the paperless-desktop code ;-)