Skip to content

Commit

Permalink
refactor: close on select verification
Browse files Browse the repository at this point in the history
  • Loading branch information
“larissa-kamily-brisa” committed Sep 25, 2023
1 parent 2f727c0 commit 632f9a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions projects/ion/src/lib/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ export class IonSidebarComponent {

public itemSelected(itemIndex: number): void {
selectItemByIndex(this.items, itemIndex);
this.closeOnSelect ? this.toggleSidebarVisibility() : false;
if (this.closeOnSelect) {
this.toggleSidebarVisibility();
}
}

public itemOnGroupSelected(groupIndex: number): void {
unselectAllItems(this.items, groupIndex);
this.closeOnSelect ? this.toggleSidebarVisibility() : false;
if (this.closeOnSelect) {
this.toggleSidebarVisibility();
}
}

public groupSelected(groupIndex: number): void {
Expand Down

0 comments on commit 632f9a8

Please sign in to comment.