Skip to content

NVR with realtime local object detection for IP cameras

Ensure review cameras are sorted by config ui order if specified (#12789)

Josh Hawkinsf47984818f42
diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx
index 5ee0ac9bb5..d01ea384f5 100644
--- a/web/src/components/filter/ReviewFilterGroup.tsx
+++ b/web/src/components/filter/ReviewFilterGroup.tsx
@@ -136,7 +136,11 @@ export default function ReviewFilterGroup({
const filterValues = useMemo(
() => ({
- cameras: Object.keys(config?.cameras || {}),
+ cameras: Object.keys(config?.cameras ?? {}).sort(
+ (a, b) =>
+ (config?.cameras[a]?.ui?.order ?? 0) -
+ (config?.cameras[b]?.ui?.order ?? 0),
+ ),
labels: Object.values(allLabels || {}),
zones: Object.values(allZones || {}),
}),