Skip to content

Commit

Permalink
fix(module:dropdown): close menu when click again (#6353)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Jan 22, 2021
1 parent 8233dc4 commit 13e8ff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/dropdown/dropdown.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class NzDropDownDirective implements AfterViewInit, OnDestroy, OnChanges,
/** merged mouse state **/
const mergedMouseState$ = merge(menuMouseState$, hostMouseState$);
/** host click state **/
const hostClickState$ = fromEvent(nativeElement, 'click').pipe(mapTo(true));
const hostClickState$ = fromEvent(nativeElement, 'click').pipe(map(() => !this.nzVisible));
/** visible state switch by nzTrigger **/
const visibleStateByTrigger$ = this.nzTrigger$.pipe(
switchMap(trigger => {
Expand Down

0 comments on commit 13e8ff0

Please sign in to comment.