mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 23:25:25 +03:00
Reset filters
This commit is contained in:
parent
0c09ad63d9
commit
f96edc7fa4
@ -796,8 +796,8 @@ export function SubFilterContent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
type SearchTypeButtonProps = {
|
type SearchTypeButtonProps = {
|
||||||
selectedSearchSources: SearchSource[];
|
selectedSearchSources: SearchSource[] | undefined;
|
||||||
updateSearchSourceFilter: (sources: SearchSource[]) => void;
|
updateSearchSourceFilter: (sources: SearchSource[] | undefined) => void;
|
||||||
};
|
};
|
||||||
function SearchTypeButton({
|
function SearchTypeButton({
|
||||||
selectedSearchSources,
|
selectedSearchSources,
|
||||||
@ -879,8 +879,8 @@ function SearchTypeButton({
|
|||||||
}
|
}
|
||||||
|
|
||||||
type SearchTypeContentProps = {
|
type SearchTypeContentProps = {
|
||||||
selectedSearchSources: SearchSource[];
|
selectedSearchSources: SearchSource[] | undefined;
|
||||||
updateSearchSourceFilter: (sources: SearchSource[]) => void;
|
updateSearchSourceFilter: (sources: SearchSource[] | undefined) => void;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
};
|
};
|
||||||
export function SearchTypeContent({
|
export function SearchTypeContent({
|
||||||
@ -889,7 +889,7 @@ export function SearchTypeContent({
|
|||||||
onClose,
|
onClose,
|
||||||
}: SearchTypeContentProps) {
|
}: SearchTypeContentProps) {
|
||||||
const [currentSearchSources, setCurrentSearchSources] = useState<
|
const [currentSearchSources, setCurrentSearchSources] = useState<
|
||||||
SearchSource[]
|
SearchSource[] | undefined
|
||||||
>(selectedSearchSources);
|
>(selectedSearchSources);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -953,14 +953,8 @@ export function SearchTypeContent({
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
updateSearchSourceFilter([
|
updateSearchSourceFilter(undefined);
|
||||||
"thumbnail",
|
setCurrentSearchSources(undefined);
|
||||||
"description",
|
|
||||||
] as SearchSource[]);
|
|
||||||
setCurrentSearchSources([
|
|
||||||
"thumbnail",
|
|
||||||
"description",
|
|
||||||
] as SearchSource[]);
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Reset
|
Reset
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user