Skip to content

Commit

Permalink
feat(module: drawer): add visibleChange event
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-nest-moon committed Aug 14, 2020
1 parent c00659e commit cc0d305
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ng-nest/ui/drawer/drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export class XDrawerComponent extends XDrawerProperty implements OnInit, OnChang
if (this.portalAttached()) {
this.portal?.overlayRef?.detach();
this.unsubscribe();
this.visibleChange.emit(this.visible as boolean);
this.close.emit();
return true;
}
Expand Down
5 changes: 5 additions & 0 deletions lib/ng-nest/ui/drawer/drawer.property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ export class XDrawerProperty extends XProperty {
* @en_US Closed event
*/
@Output() close = new EventEmitter();
/**
* @zh_CN 显示/隐藏的事件
* @en_US Show/hide event
*/
@Output() visibleChange = new EventEmitter<boolean>();
}

0 comments on commit cc0d305

Please sign in to comment.