How to use the @material/form-field.MDCFormField.attachTo function in @material/form-field

To help you get started, we’ve selected a few @material/form-field 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 / form-field / FormField.vue View on Github external
mounted () {
    this.mdcFormField = MDCFormField.attachTo(this.$el)
    // TODO: Better solution to avoid direct children access?!
    if (this.$children.length === 1) {
      if (this.$children[0]._data.mdcRadio) {
        this.mdcFormField.input = this.$children[0]._data.mdcRadio
      } else if (this.$children[0]._data.mdcCheckbox) {
        this.mdcFormField.input = this.$children[0]._data.mdcCheckbox
      }
    }
  },
  beforeDestroy () {