Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(dropdown): correctly update isOpen
Browse files Browse the repository at this point in the history
- Update bound value of `isOpen` correctly on toggle

Closes #5589
Fixes #3261
  • Loading branch information
wesleycho committed Mar 6, 2016
1 parent 7949494 commit aac0d2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
};

this.toggle = function(open) {
return scope.isOpen = arguments.length ? !!open : !scope.isOpen;
scope.isOpen = arguments.length ? !!open : !scope.isOpen;
if (angular.isFunction(setIsOpen)) {
setIsOpen(scope, scope.isOpen);
}

return scope.isOpen;
};

// Allow other directives to watch status
Expand Down

0 comments on commit aac0d2b

Please sign in to comment.