You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2024/03/04 15:59:53 UTC

(superset) 01/04: fix(dashboard): table chart drag preview overflowing container (#27308)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/superset.git

commit d8c4a7a067734c83c61a2e7338c0337500c29fa3
Author: Ross Mabbett <92...@users.noreply.github.com>
AuthorDate: Thu Feb 29 17:37:55 2024 -0500

    fix(dashboard): table chart drag preview overflowing container (#27308)
    
    (cherry picked from commit ad3995daf62984bc0652c155643e0aca3a2840a0)
---
 superset-frontend/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 6a49f98875..92a3ab5636 100644
--- a/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx
+++ b/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx
@@ -77,6 +77,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;