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

selectedNodes not set on ready.jstree event #68

Open
ashrafhasson opened this issue Jul 4, 2017 · 1 comment
Open

selectedNodes not set on ready.jstree event #68

ashrafhasson opened this issue Jul 4, 2017 · 1 comment

Comments

@ashrafhasson
Copy link

Hi, thanks for the great addon! :)

I had a need to disable a few (or all) nodes immediately after finishing loading based on some app state and logic but the ready.jstree doesn't seem to set the selectedNodes here which makes it difficult to tell what to disable for me. I've tested with setting the selectedNodes in this event hook and it seems to work well on the initial loaded content. Would you accept a PR if I add the following two lines into the ready.jstree event?

let selNodes = Ember.A(this.get('treeObject').jstree(true).get_selected(true));
this.set('selectedNodes', selNodes);

Thanks,

@ashrafhasson ashrafhasson changed the title selectedNodes are not set after ready.jstree event selectedNodes not set after ready.jstree event Jul 4, 2017
@ashrafhasson ashrafhasson changed the title selectedNodes not set after ready.jstree event selectedNodes not set on ready.jstree event Jul 4, 2017
@ashrafhasson
Copy link
Author

or maybe add the ready event to the list of selectionChangedEventNames which also works well.

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

1 participant