Skip to content

Commit

Permalink
perf: make submenus lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Aug 18, 2023
1 parent 7d0a3a8 commit 93531b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/menu/src/MenuItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import menuItemStyles from './menu-item.css.js';
import checkmarkStyles from '@spectrum-web-components/icon/src/spectrum-icon-checkmark.css.js';
import type { Menu } from './Menu.js';
import { MutationController } from '@lit-labs/observers/mutation-controller.js';
import '@spectrum-web-components/overlay/sp-overlay.js';
import type { Overlay } from 'overlay/src/Overlay.js';

/**
Expand Down Expand Up @@ -266,6 +265,7 @@ export class MenuItem extends LikeAnchor(
if (!this.hasSubmenu) {
return slot;
}
import('@spectrum-web-components/overlay/sp-overlay.js');
return html`
<sp-overlay
.triggerElement=${this as HTMLElement}
Expand Down

0 comments on commit 93531b9

Please # to comment.