From 6fcafcebbbae77f2160131006f891f65d80d8b6b Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 19 Apr 2021 11:35:15 +0200 Subject: [PATCH] [GH-278] Prevent dragging of gallery cards in read-only mode (#293) Fixes: #278 --- webapp/src/components/gallery/galleryCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/gallery/galleryCard.tsx b/webapp/src/components/gallery/galleryCard.tsx index 7cb843133..ea849c644 100644 --- a/webapp/src/components/gallery/galleryCard.tsx +++ b/webapp/src/components/gallery/galleryCard.tsx @@ -37,7 +37,7 @@ type Props = { const GalleryCard = React.memo((props: Props) => { const {cardTree} = props - const [isDragging, isOver, cardRef] = useSortable('card', cardTree.card, props.isManualSort, props.onDrop) + const [isDragging, isOver, cardRef] = useSortable('card', cardTree.card, props.isManualSort && !props.readonly, props.onDrop) const visiblePropertyTemplates = props.visiblePropertyTemplates || []