-
Notifications
You must be signed in to change notification settings - Fork 159
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
Connect two Kanban components #31
Comments
Good idea. It is not possible at the moment, but it could be something I look into. |
How do you think could be an api for this? |
Yeah, I'm not sure yet, I'm thinking along the lines of having a HOC to wrap around multiple kanban instances. |
Hi, when I was looking into a fix for this, I think you may be able to do this already without needing any changes to this package. You can do it by adding two kanban components and giving them refs (I have used <kanban-board :stages="stages1" :blocks="blocks1" ref="kanban-1" />
<kanban-board :stages="stages2" :blocks="blocks2" ref="kanban-2" /> Then in the mounted method, we can mounted() {
this.$refs['kanban-2'].drake.destroy();
this.$refs['kanban-2'].$refs.list.forEach((list) => {
this.$refs['kanban-1'].drake.containers.push(list);
});
} I have just tested this locally and it appears to work. |
Oh my, good work man! Thanks for this!!! I've accomplished my goal with just one kanban instance. Yeah, this is not ideal, and for me, the ideal scenario is really make use of two instances, because we will not need to mess with css workarounds. I've made some changes to the package as well, like Another useful thing could be expose the html, so we have more control for adding and removing classes, tags, etc dynamically. Some inspiration you can get from this example demo code of vue-draggable that seems have the same html structure |
I'll try this ASAP!! 😎 |
How to connect two Kanban components ?
If this is not possible right now, this could be a good enhancement for this library.
I need to use two separated kanban components, in such way one of them is hidden through a drawer. When dragging one card from the first kanban, I would like to drag it to the second one.
The text was updated successfully, but these errors were encountered: