Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make a parent dragable with @atlaskit/tree #1136

Closed
eddyhdzg opened this issue Mar 4, 2019 · 5 comments
Closed

How to make a parent dragable with @atlaskit/tree #1136

eddyhdzg opened this issue Mar 4, 2019 · 5 comments

Comments

@eddyhdzg
Copy link

eddyhdzg commented Mar 4, 2019

I'm trying to replicate the functionality of dragging a PARENT LIST from this demo demo_with_nesting

dnd-nesting

In the pure tree demo without all the CSS from
demo_pure_tree

pure-tree

Any Ideas?

@markdon
Copy link

markdon commented Mar 5, 2019

Not sure if it's actually current, but the docs here say:

Current limitations = Plans: Currently it's not possible to drag a parent, which is already expanded. Addition to this, it's not possible to hover over another item to expand it or drop on top to nest. We are actively working on these features and we will update the documentation once they are ready.

@markdon
Copy link

markdon commented Mar 5, 2019

Having said that... There is some code in Tree that looks like it should handle this 59 68

I need to make this work in the near future 😉

@alexreardon
Copy link
Collaborator

@balnagy ^

@eddyhdzg
Copy link
Author

eddyhdzg commented Mar 9, 2019

I still can't make the demo_pure_tree work like in this demo

Which the parent changes to collapsed when I want to drag it

How can I make the function closeParentIfNeeded work in

gif2

Can you please help me with some working code 👀?

@balnagy
Copy link

balnagy commented Mar 9, 2019

Hi @eddyhdzg,

As @markdon pointed out in the documentation, this was a limitation earlier, but the docs needs to be updated as this feature already implemented.

To make pure list work, you need to create a scrollable container. Here is one working example: https://codesandbox.io/s/v6m657wk70?fontsize=14

@eddyhdzg eddyhdzg changed the title Problem with @atlaskit/tree How to make a parent dragable with @atlaskit/tree Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants