How to use the @material/form-field.MDCFormField 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 fintechstudios / angularjs-mdc / src / mdc-form-field / component.js View on Github external
setChildCtrl(ctrl) {
    if (this.mdc) {
      this.mdc.destroy();
    }

    if (ctrl && ctrl.mdc) {
      this.mdc = new MDCFormField(this.$element[0]);
      this.mdc.input = ctrl.mdc;
    }
  }
github dessant / web-archives / src / options / components / FormField.vue View on Github external
mounted: function() {
    this.mdcFormField = new MDCFormField(this.$el);
  }
};
github matsp / material-components-vue / src / components / FormField / FormField.vue View on Github external
mounted() {
    this.mdcFormField = new MDCFormField(this.$el)
  },
  destroyed() {
github Tencent / omi / packages / omim / src / radio / index.tsx View on Github external
installed() {
    const radio = new MDCRadio(this.shadowRoot.querySelector('.mdc-radio'))
    const formField = new MDCFormField(this.shadowRoot.querySelector('.mdc-form-field'))
    formField.input = radio
    this.radio = radio
    this.group = this.getScopeRoot(this.shadowRoot.host).querySelectorAll(`m-radio[name='${this.props.name}']`)
    //fix group 不一致
    this.group.forEach(ele => {
      ele.group = this.group
    })
  }
github Tencent / omi / packages / omim / src / checkbox / index.tsx View on Github external
installed() {
    const checkbox = new MDCCheckbox(this.shadowRoot.querySelector('.mdc-checkbox'))
    const formField = new MDCFormField(this.shadowRoot.querySelector('.mdc-form-field'))
		formField.input = checkbox
  }