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

Events for trees in navigation not triggered #1536

Closed
NePheus opened this issue Jun 12, 2017 · 2 comments
Closed

Events for trees in navigation not triggered #1536

NePheus opened this issue Jun 12, 2017 · 2 comments

Comments

@NePheus
Copy link

NePheus commented Jun 12, 2017

The collpase and expand events for the tree navigation items are never triggered. You want to trigger it on the ul elements of the depending tree, but its always undefined. See:
https://github.com/almasaeed2010/AdminLTE/blob/master/dist/js/adminlte.js#L457
https://github.com/almasaeed2010/AdminLTE/blob/master/dist/js/adminlte.js#L468
this.element is always undefined because 'this' is the reference to the slideDown/Up event. You have to save it to a variable before the animate call, i.e.:

var $element = $(this.element);
tree.slideDown(this.options.animationSpeed, function () {
      $element.trigger(expandedEvent)
})

Then the event gets triggered as it should.

@almasaeed2010
Copy link
Contributor

@NePheus good catch! Thanks for reporting. Will fix soon.

almasaeed2010 added a commit that referenced this issue Jun 25, 2017
@almasaeed2010
Copy link
Contributor

Fixed in master (v2.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants