Skip to content

Commit

Permalink
perf(menu): remove meaningless iteration of all menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschmidt committed Sep 29, 2022
1 parent 3e19bc6 commit 85fc44a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,6 @@ export class Menu {

private handleSelect = (event: CustomEvent<MenuItem>) => {
event.stopPropagation();
this.items = this.items.map((item: MenuItem) => {
if (item === event.detail) {
return event.detail;
}

return item;
});
this.select.emit(event.detail);
this.open = false;
};
Expand Down

0 comments on commit 85fc44a

Please sign in to comment.