How to use the @material/textfield.MDCTextFieldCharacterCounterFoundation function in @material/textfield

To help you get started, we’ve selected a few @material/textfield 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 / form-field / character-counter.ts View on Github external
getDefaultFoundation() {
    const adapter: MDCTextFieldCharacterCounterAdapter = {
      setContent: (content: string) => this.elementRef.nativeElement.textContent = content
    };
    return new MDCTextFieldCharacterCounterFoundation(adapter);
  }
github jamesmfriedman / rmwc / src / textfield / index.tsx View on Github external
getDefaultFoundation() {
    return new MDCTextFieldCharacterCounterFoundation({
      setContent: (content: string) => {
        this.setState({ content });
      }
    });
  }