How to use the @material/list/index.MDCList.attachTo function in @material/list

To help you get started, we’ve selected a few @material/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 material-components / material-components-web-catalog / src / ListCatalog.js View on Github external
initList = listEl => {
    if (listEl) {
      this.list = MDCList.attachTo(listEl);
    }
  };
github material-components / material-components-web-catalog / src / DrawerCatalog.js View on Github external
initDrawer = drawerEle => {
    if (!drawerEle) return;

    this.list = MDCList.attachTo(drawerEle.querySelector('.mdc-list'));
    this.list.wrapFocus = true;
  };
github material-components / material-components-web-catalog / src / frame / DrawerFramePage.js View on Github external
initDrawer = drawerEle => {
    if (!drawerEle) return;

    const {match} = this.props;
    if (match.params.type === 'dismissible' ||
        match.params.type === 'modal') {
      this.drawer = new MDCDrawer(drawerEle);
    } else {
      const list = MDCList.attachTo(drawerEle.querySelector('.mdc-list'));
      list.wrapFocus = true;
    }
  };