From 62ead6c8a1a465af712f870d4ca2f25ff13b7153 Mon Sep 17 00:00:00 2001 From: Ross Mabbett <92495987+rtexelm@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:37:55 -0500 Subject: [PATCH] fix(dashboard): table chart drag preview overflowing container (#27308) --- .../src/dashboard/components/dnd/DragDroppable.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx b/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx index 185b4c08c6c7f..bce458dfe6f71 100644 --- a/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx +++ b/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx @@ -74,6 +74,12 @@ const defaultProps = { const DragDroppableStyles = styled.div` ${({ theme }) => css` position: relative; + /* + Next line is a workaround for a bug in react-dnd where the drag + preview expands outside of the bounds of the drag source card, see: + https://github.com/react-dnd/react-dnd/issues/832#issuecomment-442071628 + */ + transform: translate3d(0, 0, 0); &.dragdroppable--dragging { opacity: 0.2;