mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 22:25:24 +03:00
Fix clicking
This commit is contained in:
parent
ebcae504cd
commit
52d4fb1cfc
@ -37,7 +37,13 @@ export default function Chip({
|
||||
"z-10 flex items-center rounded-2xl px-2 py-1.5",
|
||||
className,
|
||||
)}
|
||||
onClick={onClick}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
if (onClick) {
|
||||
onClick();
|
||||
}
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
@ -18,6 +18,7 @@ import { VideoPreview } from "../preview/ScrubbablePreview";
|
||||
import { Preview } from "@/types/preview";
|
||||
import { SearchResult } from "@/types/search";
|
||||
import { LuInfo } from "react-icons/lu";
|
||||
import useContextMenu from "@/hooks/use-contextmenu";
|
||||
|
||||
type SearchPlayerProps = {
|
||||
searchResult: SearchResult;
|
||||
@ -54,6 +55,10 @@ export default function SearchThumbnailPlayer({
|
||||
preventScrollOnSwipe: true,
|
||||
});
|
||||
|
||||
useContextMenu(imgRef, () => {
|
||||
onClick(searchResult, true);
|
||||
});
|
||||
|
||||
// playback
|
||||
|
||||
const relevantPreview = useMemo(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user