question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nested grids drag drop doesn't dispose when hovering over nested grid

See original GitHub issue

I couldn’t reproduce this on codesandbox because dragging doesn’t seem to work there, so I made a case on stackblitz: https://stackblitz.com/edit/react-qeuac3?file=src%2FApp.js

When you drag the element into the first grid on the right side and the drag it to the left between 0 and 1 you can see that the placeholder doesn’t disappear.

It will also trigger 2 drop events, which can be fixed by adding event.stopPropagation();, but this causes the ghost overlay to remain and only to disappear when starting another drag.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rogerfarcommented, Jun 11, 2021

@thomaspessato I updated my example here: https://stackblitz.com/edit/react-qeuac3?file=src%2Freact-grid-layout.js.

The only thing I did here was take the current master, build it and pasted the minified output in react-grid-layout.js. Then I added e.stopPropogation:

F(X(t), 'onDragLeave', function(e) {
                  e.preventDefault(),
                    e.stopPropagation(),
                    t.dragEnterCounter--,
                    0 === t.dragEnterCounter && t.removeDroppingPlaceholder();
                }),
                F(X(t), 'onDragEnter', function(e) {
                  e.preventDefault(), e.stopPropagation(), t.dragEnterCounter++;
                }),
                F(X(t), 'onDrop', function(e) {
                  e.preventDefault();
                  e.stopPropagation();
                  var r = t.props.droppingItem,
                    n = t.state.layout,
                    o = n.find(function(t) {
                      return t.i === r.i;
                    });
                  (t.dragEnterCounter = 0),
                    t.removeDroppingPlaceholder(),
                    t.props.onDrop(n, o, e);
                }),
0reactions
STRMLcommented, Feb 21, 2022

Fixed in #1494

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nested grids drag drop doesn't dispose when hovering over ...
When you drag the element into the first grid on the right side and the drag it to the left between 0 and...
Read more >
Hover each row in nested grid from parent grid - Stack Overflow
I would like to make a hover on each row from nested grid in grid which the template is rendered by columns instead...
Read more >
Design flaw ? not possible to implement Nested Grid with ...
Hi,. I tried implementing Nested grid with drag drop feature, (Nested grid and another grid from which I tried to drag drop in...
Read more >
gridstack-cli - npm
gridstack.js is a jQuery plugin for widget layout. This is drag-and-drop multi-column grid. It allows you to build draggable responsive ...
Read more >
Version History Old - JIDE Software
(Grids) Allows Ctrl+Click to deselect a selected cell in non-contiguous selection JideTable. See bug report here. (Grids) Fixed the nested table header style...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found