Skip to content

Commit

Permalink
feat(popover): Updated property 'isOpen' in show and hide methods (#1765
Browse files Browse the repository at this point in the history
)

Updated property 'isOpen' into 'show' and 'hide' methods. Through this is possible to use 'toggle' method together with 'show' and 'hide' methods. 
Example: if you want to toggle popover by using a button and close it also by click another button inside the popover.
  • Loading branch information
npacucci authored and valorkin committed Mar 16, 2017
1 parent 43d5d7a commit 363d9e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/popover/popover.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export class PopoverDirective implements OnInit, OnDestroy {
placement: this.placement,
title: this.popoverTitle
});
this.isOpen = true;
}

/**
Expand All @@ -95,6 +96,7 @@ export class PopoverDirective implements OnInit, OnDestroy {
public hide(): void {
if (this.isOpen) {
this._popover.hide();
this.isOpen = false;
}
}

Expand Down

0 comments on commit 363d9e6

Please sign in to comment.