How to use the @material/menu.DefaultFocusState.LIST_ROOT function in @material/menu

To help you get started, we’ve selected a few @material/menu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trimox / angular-mdc-web / packages / menu / menu.ts View on Github external
import {closest} from '@material/dom/ponyfill';
import {cssClasses, strings, DefaultFocusState, MDCMenuFoundation} from '@material/menu';

export class MdcMenuSelectedEvent {
    public index: number,
    public source: MdcListItem) {}

let nextUniqueId = 0;

export type MdcMenuFocusState = 'none' | 'list' | 'firstItem' | 'lastItem';

  none: DefaultFocusState.NONE,
  list: DefaultFocusState.LIST_ROOT,
  firstItem: DefaultFocusState.FIRST_ITEM,
  lastItem: DefaultFocusState.LAST_ITEM

  selector: '[mdcMenuSelectionGroup], mdc-menu-selection-group',
  host: {'class': 'mdc-menu__selection-group'},
  exportAs: 'mdcMenuSelectionGroup'
export class MdcMenuSelectionGroup {
  constructor(public elementRef: ElementRef) {}

  selector: '[mdcMenuSelectionGroupIcon], mdc-menu-selection-group-icon',
  host: {'class': 'mdc-menu__selection-group-icon'},