Replies: 2 comments 1 reply
-
I finally partially attempted to do this, by implementing the onDropDragOver event, and returning the desired h and w for the default item before the drag starts, as I could review the code allows here: react-grid-layout/lib/ReactGridLayout.jsx Line 682 in 89bf059 Its still unstable and moves a lot while dragging from outside, compared to how dragging works when dragging a component that is already part of the layout. |
Beta Was this translation helpful? Give feedback.
-
Another thing I found strange, is that the event parameter for onDropDragOver does not allows to get the data for a given item: const onDropDragOver = useCallback((e) => { |
Beta Was this translation helpful? Give feedback.
-
Hi community!
We have implemented react-grid-layout for a dashboard view that allows to drag & drop items into it. We notice that the layout becomes really unstable as the user is dragging the item from outside, however it is very stable as you are dragging items that are already within the layout. My assumption, is that since dragging items from outside always creates layout items that have a w:1 and h:1, they somehow need to compete more for space within a grid that has larger items. So my question is:
Is it possible to provide a different width and height to a draggable item that is still being dragged into the grid, but is not fully part of it yet?
Let me know if my question is not clear enough and I need to provide more details. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions