From 458014d91ef2ebcad15382fe204c4bfceedd9c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Tue, 19 Sep 2023 15:34:10 +0300 Subject: [PATCH] Fixed #13702 - Menu | Throws error on tab --- src/app/components/menu/menu.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/components/menu/menu.ts b/src/app/components/menu/menu.ts index 8699bc99323..7b8baf5ad9d 100755 --- a/src/app/components/menu/menu.ts +++ b/src/app/components/menu/menu.ts @@ -465,7 +465,8 @@ export class Menu implements OnDestroy { } } - menuitemId(id: string, index?: string, childIndex?: string) { + menuitemId(item: MenuItem, id: string, index?: string, childIndex?: string) { + // let itemId = item.id ?? id; return `${id}_${index}${typeof childIndex !== 'undefined' ? '_' + childIndex : ''}`; } @@ -501,8 +502,8 @@ export class Menu implements OnDestroy { onListBlur(event: FocusEvent | MouseEvent) { this.focused = false; this.changeFocusedOptionIndex(-1); - this.selectedOptionIndex.set(null); - this.focusedOptionIndex.set(null); + this.selectedOptionIndex.set(-1); + this.focusedOptionIndex.set(-1); this.onBlur.emit(event); }