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

How to access the optional parameters sent to setActive method #162

Closed
evdinursan opened this issue Mar 19, 2014 · 4 comments
Closed

How to access the optional parameters sent to setActive method #162

evdinursan opened this issue Mar 19, 2014 · 4 comments
Labels
Milestone

Comments

@evdinursan
Copy link

Hi,

First of all, thank you for this great treeview control. Is wonderfull - I've used others in the past but far from others this one is the greatest...

Now, I have a question - if I'm sending an optional parameter to the node.setActive method like this:

currentNode.setActive(true, { noPreview: true });

how can I access my optional parameter (noPreview) in the activate event handler:

activate: function (event, data) { }

Thank you.
Evdin

@mar10 mar10 added the question label Mar 20, 2014
@mar10
Copy link
Owner

mar10 commented Mar 20, 2014

The optional opts object is only there to control the behavior of setAction. It is not passed to the event handler.

The only value currently supported is {noEvents: false}, which can be set to true to prevent triggering beforeActivate, activate, and deactivate events.
(Note that I just implemented it after you opened the request.)

@mar10 mar10 closed this as completed in 944da76 Mar 20, 2014
@evdinursan
Copy link
Author

Thank you very much. I will download it now. Thanks again!

@evdinursan
Copy link
Author

It's working. THANK YOU! I have only one question - I'm not very familiar with the git system and I took the source code from the repository and I've overwrote the file that I downloaded from the 2.0.0 - 7 release. Can you please tell me when this change will be visible into a release download? Thank you again for the clarifications.

@mar10
Copy link
Owner

mar10 commented Mar 21, 2014

It will be in the release 2.0.0-8, but you can get the latest code here
https://github.com/mar10/fancytree/archive/master.zip

@mar10 mar10 added this to the 2.0.0-8 milestone Mar 23, 2014
@mar10 mar10 modified the milestones: 2.0.0beta, 2.0.0-8 May 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants