How to use the @material/select.MDCSelectHelperTextFoundation function in @material/select

To help you get started, we’ve selected a few @material/select 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 / select / select-helper-text.ts View on Github external
getDefaultFoundation() {
    const adapter: MDCSelectHelperTextAdapter = {
      addClass: (className: string) => this.elementRef.nativeElement.classList.add(className),
      removeClass: (className: string) => this.elementRef.nativeElement.classList.remove(className),
      hasClass: (className: string) => this.elementRef.nativeElement.classList.contains(className),
      setAttr: (attr: string, value: string) => this.elementRef.nativeElement.setAttribute(attr, value),
      removeAttr: (attr: string) => this.elementRef.nativeElement.removeAttribute(attr),
      setContent: () => {}
    };
    return new MDCSelectHelperTextFoundation(adapter);
  }