How to use the @material/tab/foundation.MDCTabFoundation function in @material/tab

To help you get started, we’ve selected a few @material/tab 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-react / packages / tab / index.tsx View on Github external
componentDidMount() {
    const {active, focusOnActivate} = this.props;
    this.foundation = new MDCTabFoundation(this.adapter);
    this.foundation.init();
    this.foundation.setFocusOnActivate(focusOnActivate!);
    if (active) {
      this.foundation.activate();
    }
  }