react-redux-grid icon indicating copy to clipboard operation
react-redux-grid copied to clipboard

Is there a way to prevent a node from moving?

Open RodriFS-InflightVR opened this issue 6 years ago • 3 comments

Hi, Ben!

I have a tree with folders and files and I want to prevent a folder to be nested under a file when dragging. The problem is that I don't have an event for when I start dragging to check what object I'm dragging and an event for where the object is about to be moved to freeze the grid or alert the user and roll back the row to it's original position.

Thanks!

RodriFS-InflightVR avatar Jan 24 '19 08:01 RodriFS-InflightVR

+1 We have a tree where some "tip" nodes must not have children.

Phenixer avatar Aug 02 '19 19:08 Phenixer

Hi, has anyone found a solution?

baloraki avatar Sep 18 '19 12:09 baloraki

Hi, has anyone found a solution?

Hi, baloraki. What I did is check which row was moved, and if it is an invalid movement, or I don't want the user to move that row, I roll back the grid state to the previous state before it was moved

RodriFS-InflightVR avatar Sep 18 '19 13:09 RodriFS-InflightVR