diff --git a/projects/ion/src/lib/sidebar/sidebar.component.ts b/projects/ion/src/lib/sidebar/sidebar.component.ts index 757f066d6..b5093bf4d 100644 --- a/projects/ion/src/lib/sidebar/sidebar.component.ts +++ b/projects/ion/src/lib/sidebar/sidebar.component.ts @@ -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 {