From f37a7cf310ae5e4b9ce1861ff4fa6078396cb90e Mon Sep 17 00:00:00 2001 From: Richard Murnane Date: Wed, 11 Sep 2024 11:46:06 +1000 Subject: [PATCH] Sort digiModes dropdown in DemodulatorPanel.js (#59) --- htdocs/lib/DemodulatorPanel.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js index 613081c7..c37d2399 100644 --- a/htdocs/lib/DemodulatorPanel.js +++ b/htdocs/lib/DemodulatorPanel.js @@ -52,7 +52,10 @@ function DemodulatorPanel(el) { DemodulatorPanel.prototype.render = function() { var available = Modes.getModes().filter(function(m){ return m.isAvailable(); }); var normalModes = available.filter(function(m){ return m.type === 'analog'; }); - var digiModes = available.filter(function(m){ return m.type === 'digimode'; }); + + var digiModes = available + .filter(function(m){ return m.type === 'digimode'; }) + .sort(function(a, b){ return a.name.localeCompare(b.name) }); var html = []