aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/main/MainPage.js4
-rw-r--r--modern/src/reports/components/ReportFilter.js4
2 files changed, 5 insertions, 3 deletions
diff --git a/modern/src/main/MainPage.js b/modern/src/main/MainPage.js
index 83440830..2d0671ae 100644
--- a/modern/src/main/MainPage.js
+++ b/modern/src/main/MainPage.js
@@ -310,7 +310,9 @@ const MainPage = () => {
onChange={(e) => setFilterGroups(e.target.value)}
multiple
>
- {Object.values(groups).map((group) => (<MenuItem key={group.id} value={group.id}>{group.name}</MenuItem>))}
+ {Object.values(groups).sort((a, b) => a.name.localeCompare(b.name)).map((group) => (
+ <MenuItem key={group.id} value={group.id}>{group.name}</MenuItem>
+ ))}
</Select>
</FormControl>
<FormControl>
diff --git a/modern/src/reports/components/ReportFilter.js b/modern/src/reports/components/ReportFilter.js
index d223b086..75c9d43d 100644
--- a/modern/src/reports/components/ReportFilter.js
+++ b/modern/src/reports/components/ReportFilter.js
@@ -80,7 +80,7 @@ const ReportFilter = ({ children, handleSubmit, showOnly, ignoreDevice, multiDev
onChange={(e) => (multiDevice ? setDeviceIds(e.target.value) : setDeviceId(e.target.value))}
multiple={multiDevice}
>
- {Object.values(devices).map((device) => (
+ {Object.values(devices).sort((a, b) => a.name.localeCompare(b.name)).map((device) => (
<MenuItem key={device.id} value={device.id}>{device.name}</MenuItem>
))}
</Select>
@@ -97,7 +97,7 @@ const ReportFilter = ({ children, handleSubmit, showOnly, ignoreDevice, multiDev
onChange={(e) => setGroupIds(e.target.value)}
multiple
>
- {Object.values(groups).map((group) => (
+ {Object.values(groups).sort((a, b) => a.name.localeCompare(b.name)).map((group) => (
<MenuItem key={group.id} value={group.id}>{group.name}</MenuItem>
))}
</Select>