Skip to content

Commit

Permalink
Merge pull request #2137 from agross/sort-rooms
Browse files Browse the repository at this point in the history
Sort rooms
  • Loading branch information
arteck authored Jun 12, 2024
2 parents f5fb2af + 0efcd78 commit e7239e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ function showDevices() {
const roomSelector = $('#room-filter');
roomSelector.empty();
roomSelector.append(`<li class="device-order-item" data-type="All" tabindex="0"><a class="translate" data-lang="All">All</a></li>`);
allRooms.forEach((item) => {
Array.from(allRooms)
.sort()
.forEach((item) => {
roomSelector.append(`<li class="device-order-item" data-type="${item}" tabindex="0"><a class="translate" data-lang="${item}">${item}</a></li>`);
});
$('#room-filter a').click(function () {
Expand Down

0 comments on commit e7239e6

Please sign in to comment.