order songs by name

This commit is contained in:
2023-04-22 13:27:20 +02:00
parent 54399b154a
commit 9ac0b9ab7d

View File

@@ -29,7 +29,7 @@ export class SongListComponent implements OnInit, OnDestroy {
const songs = _[1]; const songs = _[1];
const filter = _[0]; const filter = _[0];
this.anyFilterActive = this.checkIfFilterActive(filter); this.anyFilterActive = this.checkIfFilterActive(filter);
return songs.filter(song => this.filter(song, filter)); return songs.filter(song => this.filter(song, filter)).sort((a, b) => a.title.localeCompare(b.title));
}) })
); );
public anyFilterActive = false; public anyFilterActive = false;