Skip to content

Commit

Permalink
fix(module:dropdown): close menu when click again (#6353) (#6354)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 authored Feb 13, 2021
1 parent 6b878b9 commit cd90349
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 cd90349

Please sign in to comment.