Code Monkey home page Code Monkey logo

Comments (13)

zeljkohuber avatar zeljkohuber commented on May 22, 2024 1

Ok, I will try to implement it and I can let you know about it when its done, if you are interested.

Just one more thing, so I don't open a new issue here. Do you happen to have typescript definiton file?

Thank you.

from react-sortable-tree.

zeljkohuber avatar zeljkohuber commented on May 22, 2024 1

@larsts Main reason why I choose Redux is because I would then have separate components (source and destination tree) which would be much easier to integrate and Redux would be used for their communication. First solution I came up is creating container component (no Redux) which encapsulates both source and tree and handles their communication, but that way when you add container component in your project you don't have that much freedom of styling and moving inner components (source/dest), so I chose Redux to make that easier (another reason for Redux is because I'll need to integrate this component in angular2 application so Redux is the only way to communicate with angular2 as far as I know). The react-sortable-tree is so well written and structured that is pretty easy to make basic implementation with Redux, since all actions are already separated from the components so you just move state from component itself to Redux and reuse already implemented actions (from tree-data-utils.js) in reducers.

from react-sortable-tree.

fritz-c avatar fritz-c commented on May 22, 2024 1

Possible now as of 1.0.0.
https://fritz-c.github.io/react-sortable-tree/storybook/?selectedKind=Advanced&selectedStory=Tree-to-tree%20dragging&full=0&down=1&left=1&panelRight=0&downPanel=storybook%2Fnotes%2Fpanel

from react-sortable-tree.

fritz-c avatar fritz-c commented on May 22, 2024

It's not possible by default. I think it could be pulled off with some extra implementation, but I haven't ever looked into it.

from react-sortable-tree.

fritz-c avatar fritz-c commented on May 22, 2024

Alright, that would be great!

I don't have a typescript definition file.

from react-sortable-tree.

arminmaurice1990 avatar arminmaurice1990 commented on May 22, 2024

@zeljkohuber I'm also looking into this functionality, any luck so far?

from react-sortable-tree.

zeljkohuber avatar zeljkohuber commented on May 22, 2024

@arminconscia Still working on it but doing pretty big refactoring because its pretty hard to use it as separate components so I'm going with Redux implementation.

from react-sortable-tree.

arminmaurice1990 avatar arminmaurice1990 commented on May 22, 2024

@zeljkohuber Ahh okay, thanks for the reply, makes sense.

from react-sortable-tree.

larsts avatar larsts commented on May 22, 2024

@zeljkohuber I was looking into solving a similar situation but gave up trying to refactor, seemed to be to big of a rewrite. I ended up going for a non drag-and-drop solution.
You say you are going with a Redux implementation, would you mind sharing further details here? :)

from react-sortable-tree.

larsts avatar larsts commented on May 22, 2024

@zeljkohuber That all sounds very good!

And I'm sure more people than myself would be interested in having a look at the result / code when you have made it work :)

from react-sortable-tree.

AaronHarris avatar AaronHarris commented on May 22, 2024

@zeljkohuber I also have a need for this issue. https://github.com/vakata/jstree handles this quite well (esp when it comes to inter-tree communication), it may be worth a look there for inspiration. What parts of your implementation are still needed?

from react-sortable-tree.

matt-stj avatar matt-stj commented on May 22, 2024

@zeljkohuber - how'd your implementation go with redux? I'm working on something similar and would be curious to know how it all panned out.

from react-sortable-tree.

zeljkohuber avatar zeljkohuber commented on May 22, 2024

@matt-stj - we haven't worked on redux implementation as we've planned...

from react-sortable-tree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.