Fix mark items not clearing selected

This commit is contained in:
Nicolas Mowen 2024-08-12 13:00:00 -06:00
parent daa6d7672c
commit f61a2b9801
2 changed files with 4 additions and 1 deletions

View File

@ -395,6 +395,7 @@ export default function EventView({
markAllItemsAsReviewed={markAllItemsAsReviewed}
onSelectReview={onSelectReview}
onSelectAllReviews={onSelectAllReviews}
setSelectedReviews={setSelectedReviews}
pullLatestData={pullLatestData}
/>
)}
@ -437,6 +438,7 @@ type DetectionReviewProps = {
markAllItemsAsReviewed: (currentItems: ReviewSegment[]) => void;
onSelectReview: (review: ReviewSegment, ctrl: boolean) => void;
onSelectAllReviews: () => void;
setSelectedReviews: (reviewIds: string[]) => void;
pullLatestData: () => void;
};
function DetectionReview({
@ -455,6 +457,7 @@ function DetectionReview({
markAllItemsAsReviewed,
onSelectReview,
onSelectAllReviews,
setSelectedReviews,
pullLatestData,
}: DetectionReviewProps) {
const reviewTimelineRef = useRef<HTMLDivElement>(null);
@ -692,6 +695,7 @@ function DetectionReview({
className="text-white"
variant="select"
onClick={() => {
setSelectedReviews([]);
markAllItemsAsReviewed(currentItems ?? []);
}}
>

View File

@ -46,7 +46,6 @@ import { ASPECT_VERTICAL_LAYOUT, ASPECT_WIDE_LAYOUT } from "@/types/record";
import { useResizeObserver } from "@/hooks/resize-observer";
import { cn } from "@/lib/utils";
import { useFullscreen } from "@/hooks/use-fullscreen";
import ActivityIndicator from "@/components/indicators/activity-indicator";
const SEGMENT_DURATION = 30;