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

Commit aac0d2b

Browse files
committed
fix(dropdown): correctly update isOpen
- Update bound value of `isOpen` correctly on toggle Closes #5589 Fixes #3261
1 parent 7949494 commit aac0d2b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/dropdown/dropdown.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
118118
};
119119

120120
this.toggle = function(open) {
121-
return scope.isOpen = arguments.length ? !!open : !scope.isOpen;
121+
scope.isOpen = arguments.length ? !!open : !scope.isOpen;
122+
if (angular.isFunction(setIsOpen)) {
123+
setIsOpen(scope, scope.isOpen);
124+
}
125+
126+
return scope.isOpen;
122127
};
123128

124129
// Allow other directives to watch status

0 commit comments

Comments
 (0)