Comments (13)
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.
@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.
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.
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.
Alright, that would be great!
I don't have a typescript definition file.
from react-sortable-tree.
@zeljkohuber I'm also looking into this functionality, any luck so far?
from react-sortable-tree.
@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.
@zeljkohuber Ahh okay, thanks for the reply, makes sense.
from react-sortable-tree.
@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.
@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.
@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.
@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.
@matt-stj - we haven't worked on redux implementation as we've planned...
from react-sortable-tree.
Related Issues (20)
- How to use props with redux ? HOT 1
- React version dependency issue HOT 5
- how to make search nodes only starting from one node which we clicked ?
- Is it possible to make the react sortable tree ui less big with a setting : sm, md, bg ?
- React dnd upgrade HOT 2
- How to customize move handler? 🤔 HOT 2
- div is fadeout when drag
- Insert node at specific index under parent node.Iindex HOT 1
- It is possible to use a node as ReactRef() ? HOT 1
- Give Children another label/property name
- Failed to minify the code error HOT 2
- getTreeFromFlatData set rootKey as null
- Support multiple dragging
- Option to snap automatically to nearest possible level HOT 1
- Support React 18 HOT 1
- new child is added to the parent when collapsing the parent
- Using the react-sortable-tree in react 18 HOT 2
- is it possible to display the tree as a vertical tree diagram?
- About maintenance of this library
- Could not resolve dependency: React 18 with [email protected] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-sortable-tree.