How to use the @material/textfield/foundation 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 pgbross / vue-material-adapter / packages / mcwv-textfield / mdc-textfield.js View on Github external
mounted() {
    this.foundation = new MDCTextfieldFoundation(
      Object.assign(
        {
          addClass: className => {
            this.$set(this.rootClasses, className, true);
          },
          removeClass: className => {
            this.$delete(this.rootClasses, className);
          },
          hasClass: className => {
            this.$refs.root.classList.contains(className);
          },
          registerTextFieldInteractionHandler: (evtType, handler) => {
            this.$refs.root.addEventListener(evtType, handler);
          },
          deregisterTextFieldInteractionHandler: (evtType, handler) => {
            this.$refs.root.removeEventListener(evtType, handler);
github pgbross / vue-material-adapter / packages / mcwv-textfield / textfield.js View on Github external
mounted() {
    this.foundation = new MDCTextfieldFoundation(
      Object.assign(
        {
          addClass: className => {
            this.$set(this.rootClasses, className, true);
          },
          removeClass: className => {
            this.$delete(this.rootClasses, className);
          },
          hasClass: className => {
            this.$refs.root.classList.contains(className);
          },
          registerTextFieldInteractionHandler: (evtType, handler) => {
            this.$refs.root.addEventListener(evtType, handler);
          },
          deregisterTextFieldInteractionHandler: (evtType, handler) => {
            this.$refs.root.removeEventListener(evtType, handler);