Fix: Disable draggable panels on small devices (#20629)

* fix for draggable on mobile

* elaborate in code comment
This commit is contained in:
Peter Holmberg 2019-11-26 12:58:20 +01:00 committed by GitHub
parent 514f2beafc
commit cd07c3e652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,11 +58,17 @@ function GridWrapper({
}
}
/*
Disable draggable if mobile device, solving an issue with unintentionally
moving panels. https://github.com/grafana/grafana/issues/18497
*/
const draggable = width <= 420 ? false : isDraggable;
return (
<ReactGridLayout
width={lastGridWidth}
className={className}
isDraggable={isDraggable}
isDraggable={draggable}
isResizable={isResizable}
containerPadding={[0, 0]}
useCSSTransforms={false}