How to use the @rmwc/list.List.cssClasses function in @rmwc/list

To help you get started, we’ve selected a few @rmwc/list 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 jamesmfriedman / rmwc / src / menu / menu.tsx View on Github external
handleKeydown(evt: React.KeyboardEvent & KeyboardEvent) {
    this.props.onKeyDown && this.props.onKeyDown(evt);
    this.foundation.handleKeydown(evt);

    // Jump through some hoops to find out
    // that we are selecting the list item
    // This is instead of trying to listen to an event on the list item
    // which is what MDC does
    if (
      evt.which === 13 &&
      evt.target instanceof Element &&
      evt.target.classList.contains(List.cssClasses.LIST_ITEM_CLASS)
    ) {
      this.foundation.handleItemAction(evt.target);
    }
  }

@rmwc/list

RMWC List component

MIT
Latest version published 29 days ago

Package Health Score

84 / 100
Full package analysis