[GH-278] Prevent dragging of gallery cards in read-only mode (#293)

Fixes: #278
This commit is contained in:
Johannes Marbach 2021-04-19 11:35:15 +02:00 committed by GitHub
parent 9932cf16d8
commit 6fcafcebbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 || []