Skip to content

Commit

Permalink
feat(ui5-menu): fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Todor-ads committed Nov 25, 2024
1 parent fba0794 commit b92cd15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/main/src/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,9 @@ class Menu extends UI5Element {
_handleNextOrPreviousItem(menuItem: MenuItem, isNext?: boolean) {
const currentIndex = this._menuItems.indexOf(menuItem);
const nextItem = isNext ? this._menuItems[currentIndex + 1] : this._menuItems[currentIndex - 1];
const focusItem = nextItem || this._menuItems[currentIndex];

!!nextItem ? nextItem.focus() : this._menuItems[currentIndex].focus();
focusItem.focus();
}

_beforePopoverOpen(e: CustomEvent) {
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/MenuItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import AriaHasPopup from "@ui5/webcomponents-base/dist/types/AriaHasPopup.js";
import type { AccessibilityAttributes } from "@ui5/webcomponents-base/dist/types.js";
import "@ui5/webcomponents-icons/dist/nav-back.js";
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
import type { ListItemAccessibilityAttributes } from "./ListItem.js";
import NavigationMode from "@ui5/webcomponents-base/dist/types/NavigationMode.js";
import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
import {
isLeft,
isRight,
} from "@ui5/webcomponents-base/dist/Keys.js";
import type { ListItemAccessibilityAttributes } from "./ListItem.js";
import ListItem from "./ListItem.js";
import ResponsivePopover from "./ResponsivePopover.js";
import type PopoverPlacement from "./types/PopoverPlacement.js";
Expand Down

0 comments on commit b92cd15

Please sign in to comment.