fix photo selection on macos

This commit is contained in:
2022-09-17 19:28:04 +00:00
committed by Stepan Usatiuk
parent 568e0859d9
commit d7e10ff0bc

View File

@@ -1,4 +1,5 @@
import "./Overview.scss";
import * as React from "react";
import { connect } from "react-redux";
import { Dispatch } from "redux";
@@ -54,7 +55,7 @@ export const OverviewComponent: React.FunctionComponent<
const selectedPhotosRef = React.useRef<Set<number>>(selectedPhotos);
selectedPhotosRef.current = selectedPhotos;
const onCardClick = (e: React.MouseEvent<HTMLElement>, id: number) => {
if (e.ctrlKey) {
if (e.ctrlKey || e.metaKey) {
const newSelectedPhotos = new Set<number>([
...selectedPhotosRef.current,
]);