mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 09:15:22 +03:00
comments
This commit is contained in:
parent
e96b8facff
commit
8a60c83494
@ -121,10 +121,16 @@ export default function Events({ path: pathname, limit = API_LIMIT } = {}) {
|
|||||||
},
|
},
|
||||||
[limit, pathname, setSearchString]
|
[limit, pathname, setSearchString]
|
||||||
);
|
);
|
||||||
|
|
||||||
const viewEventHandler = (id) => {
|
const viewEventHandler = (id) => {
|
||||||
|
//Toggle event view
|
||||||
if (viewEvent === id) return setViewEvent(null);
|
if (viewEvent === id) return setViewEvent(null);
|
||||||
if (id in scrollToRef) scrollToRef[id].scrollIntoView();
|
|
||||||
|
//Set event id to be rendered.
|
||||||
setViewEvent(id);
|
setViewEvent(id);
|
||||||
|
|
||||||
|
//scroll the event into view
|
||||||
|
if (id in scrollToRef) scrollToRef[id].scrollIntoView();
|
||||||
};
|
};
|
||||||
const searchParams = useMemo(() => new URLSearchParams(searchString), [searchString]);
|
const searchParams = useMemo(() => new URLSearchParams(searchString), [searchString]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user