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

Multiple tree in view causing issue #44

Open
sarahm7 opened this issue Mar 7, 2019 · 8 comments
Open

Multiple tree in view causing issue #44

sarahm7 opened this issue Mar 7, 2019 · 8 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@sarahm7
Copy link

sarahm7 commented Mar 7, 2019

Need help when i use multiple instance of the component the + event is not triggering on the correct component

See example codes here:
https://stackblitz.com/edit/ngx-tree-dnd-pj9zw6?file=app%2Ftree%2Ftree.component.ts

Even if i clicked the + icon on the first instance, the last instance of the component gets updated instead

image

@Zicrael
Copy link
Owner

Zicrael commented Mar 7, 2019

@sarahm7 ,

Yes, I think it required a lot of changes. I will try fix repository after I finish another new pachage ( vue-tree-dnd) and take example of code from new package, because I write it clear and smart (have much more expirience since this repo) .
Thank you for download it, I am sorry for this bugs.

@Zicrael Zicrael added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Mar 7, 2019
@sarahm7
Copy link
Author

sarahm7 commented Mar 7, 2019

@Zicrael thanks for the reply! i'm trying to fix it in my end but i'm not sure if the approach is good for you. I placed a rootId on the tree model so i can keep track which instance it is. im testing it now and if its good already i'll create a pull request later.

@NoureddineRmila
Copy link

@Zicrael we can't use this package for drag and drop an element between two trees?

@Zicrael
Copy link
Owner

Zicrael commented Mar 12, 2019

@RmilaWeb at the current version - no:( But I hope I will fix it in next versions.

@NoureddineRmila
Copy link

@RmilaWeb at the current version - no:( But I hope I will fix it in next versions.

thanks for the reply! Can you tell me when the next version? Cause need this future.

@hirenkukadiya
Copy link

@sarahm7 can you make multiple tree?
I placed a rootId on the tree model so i can keep track which instance it is. im testing it now and if its good already i'll create a pull request later.
If its work then please share your experience..
and how it work.?

@sarahm7
Copy link
Author

sarahm7 commented Mar 21, 2019

yes i was able to do it after modifying the code. although i can't do a pull request at the moment since i'm still testing it. basically you can use it like this:

<app-tree [rootId]="1">
<app-tree [rootId]="2">
<app-tree [rootId]="3">
<app-tree [rootId]="4">

image

so the singleton tree-service can handle the event properly based on the rootId. i'm not sure if its the best solution though.

@Zicrael
Copy link
Owner

Zicrael commented Mar 21, 2019

@sarahm7 , @hirenkukadiya Thank you for support this. I don`t have so much time now for package, but I can make you collabarators. Also I almost finish new plugin for vue. Better, faster, a lot of functionality, I share it with you guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants