mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
fix filters
This commit is contained in:
parent
89f8f69948
commit
72565d68d3
@ -109,11 +109,8 @@ export default function SearchFilterGroup({
|
||||
return;
|
||||
}
|
||||
const cameraConfig = config.cameras[camera];
|
||||
cameraConfig.review.alerts.required_zones.forEach((zone) => {
|
||||
zones.add(zone);
|
||||
});
|
||||
cameraConfig.review.detections.required_zones.forEach((zone) => {
|
||||
zones.add(zone);
|
||||
Object.entries(cameraConfig.zones).map(([name, _]) => {
|
||||
zones.add(name);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -337,6 +337,7 @@ export default function InputWithTags({
|
||||
|
||||
const handleClearInput = useCallback(() => {
|
||||
setInputFocused(false);
|
||||
setInputValue("");
|
||||
resetSuggestions("");
|
||||
setSearch("");
|
||||
inputRef?.current?.blur();
|
||||
|
||||
@ -62,7 +62,7 @@ export default function SearchView({
|
||||
}
|
||||
|
||||
const labels = new Set<string>();
|
||||
const cameras = Object.keys(config.cameras);
|
||||
const cameras = searchFilter?.cameras || Object.keys(config.cameras);
|
||||
|
||||
cameras.forEach((camera) => {
|
||||
if (camera == "birdseye") {
|
||||
@ -81,7 +81,7 @@ export default function SearchView({
|
||||
});
|
||||
|
||||
return [...labels].sort();
|
||||
}, [config]);
|
||||
}, [config, searchFilter]);
|
||||
|
||||
const { data: allSubLabels } = useSWR("sub_labels");
|
||||
|
||||
@ -91,23 +91,20 @@ export default function SearchView({
|
||||
}
|
||||
|
||||
const zones = new Set<string>();
|
||||
const cameras = Object.keys(config.cameras);
|
||||
const cameras = searchFilter?.cameras || Object.keys(config.cameras);
|
||||
|
||||
cameras.forEach((camera) => {
|
||||
if (camera == "birdseye") {
|
||||
return;
|
||||
}
|
||||
const cameraConfig = config.cameras[camera];
|
||||
cameraConfig.review.alerts.required_zones.forEach((zone) => {
|
||||
zones.add(zone);
|
||||
});
|
||||
cameraConfig.review.detections.required_zones.forEach((zone) => {
|
||||
zones.add(zone);
|
||||
Object.entries(cameraConfig.zones).map(([name, _]) => {
|
||||
zones.add(name);
|
||||
});
|
||||
});
|
||||
|
||||
return [...zones].sort();
|
||||
}, [config]);
|
||||
}, [config, searchFilter]);
|
||||
|
||||
const suggestionsValues = useMemo(
|
||||
() => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user