Skip to content

Commit

Permalink
fix(sidebar): emit state change (#2645)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg committed Jan 18, 2021
1 parent bcdfcd8 commit 8a35e85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/framework/theme/components/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,20 +363,23 @@ export class NbSidebarComponent implements OnInit, OnDestroy {
*/
collapse() {
this.state = 'collapsed';
this.stateChange.emit(this.state);
}

/**
* Expands the sidebar
*/
expand() {
this.state = 'expanded';
this.stateChange.emit(this.state);
}

/**
* Compacts the sidebar (minimizes)
*/
compact() {
this.state = 'compacted';
this.stateChange.emit(this.state);
}

/**
Expand Down

0 comments on commit 8a35e85

Please sign in to comment.