How to use the @material/textfield.MDCTextField.attachTo 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 matsp / material-components-vue / components / text-field / TextField.vue View on Github external
instantiate () {
      this.mdcTextField = MDCTextField.attachTo(this.$el)
      this.mdcTextField.useNativeValidation = this.useNativeValidation
      this.mdcTextField.valid = this.valid
      this.mdcTextField.disabled = this.disabled
      this.$nextTick(() => { // wait for the DOM change
        // tell all the children that the parent is initialized
        if (this.mdcTextField.label_ instanceof MDCComponent) {
          this.mdcTextField.label_.emit('_init')
        }
        if (this.mdcTextField.outline_ instanceof MDCComponent) {
          this.mdcTextField.outline_.emit('_init')
        }
        if (this.mdcTextField.lineRipple_ instanceof MDCComponent) {
          this.mdcTextField.lineRipple_.emit('_init')
        }
        if (this.mdcTextField.helperText_ instanceof MDCComponent) {
          this.mdcTextField.helperText_.emit('_init', this.mdcTextField.helperText_)
github matsp / material-components-vue / components / Textfield / TextfieldMultiline.vue View on Github external
mounted () {
    this.mdcTextField = MDCTextField.attachTo(this.$el)
    this.float = this.labelFloat
  },
  beforeDestroy () {