mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 06:50:58 +00:00
Compare commits
2 Commits
49793aa655
...
6f2e6c4cb2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f2e6c4cb2 | ||
|
|
84f48ee3eb |
6
web/src/components/input/InputWithTags.tsx
Normal file → Executable file
6
web/src/components/input/InputWithTags.tsx
Normal file → Executable file
@ -420,11 +420,11 @@ export default function InputWithTags({
|
||||
? t("button.yes", { ns: "common" })
|
||||
: t("button.no", { ns: "common" });
|
||||
} else if (filterType === "labels") {
|
||||
return getTranslatedLabel(filterValues as string);
|
||||
return getTranslatedLabel(String(filterValues));
|
||||
} else if (filterType === "search_type") {
|
||||
return t("filter.searchType." + (filterValues as string));
|
||||
return t("filter.searchType." + String(filterValues));
|
||||
} else {
|
||||
return (filterValues as string).replaceAll("_", " ");
|
||||
return String(filterValues).replaceAll("_", " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,6 +26,15 @@ import { useDocDomain } from "@/hooks/use-doc-domain";
|
||||
|
||||
const API_LIMIT = 25;
|
||||
|
||||
// always parse these as string arrays
|
||||
const SEARCH_FILTER_ARRAY_KEYS = [
|
||||
"cameras",
|
||||
"labels",
|
||||
"sub_labels",
|
||||
"recognized_license_plate",
|
||||
"zones",
|
||||
];
|
||||
|
||||
export default function Explore() {
|
||||
// search field handler
|
||||
|
||||
@ -58,13 +67,7 @@ export default function Explore() {
|
||||
const [search, setSearch] = useState("");
|
||||
|
||||
const [searchFilter, setSearchFilter, searchSearchParams] =
|
||||
useApiFilterArgs<SearchFilter>([
|
||||
"cameras",
|
||||
"labels",
|
||||
"sub_labels",
|
||||
"recognized_license_plate",
|
||||
"zones",
|
||||
]);
|
||||
useApiFilterArgs<SearchFilter>(SEARCH_FILTER_ARRAY_KEYS);
|
||||
|
||||
const searchTerm = useMemo(
|
||||
() => searchSearchParams?.["query"] || "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user