ngx-render-material-forms 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -281,6 +281,7 @@ class MaterialComponent {
281
281
  this.control.setValue(value);
282
282
  }
283
283
  beforeSubmit() {
284
+ console.log('103=>', this.control);
284
285
  this.control.markAsTouched();
285
286
  }
286
287
  hasError() {
@@ -454,7 +455,6 @@ class MaterialTextfieldComponent extends MaterialComponent {
454
455
  constructor() {
455
456
  super(...arguments);
456
457
  this.inputType = 'text';
457
- this.emailCounter = 0;
458
458
  }
459
459
  ngAfterContentInit() {
460
460
  if (this.instance && this.control && this.instance.component.disabled) {
@@ -486,6 +486,7 @@ class MaterialTextfieldComponent extends MaterialComponent {
486
486
  return appearances.includes(appearance) ? appearance : undefined;
487
487
  }
488
488
  isError() {
489
+ console.log(this.instance);
489
490
  if (this.instance.error) {
490
491
  this.control.setErrors(this.instance.component.validate);
491
492
  return true;
@@ -502,11 +503,6 @@ class MaterialTextfieldComponent extends MaterialComponent {
502
503
  //this.control.hasError(msg.context.validator)
503
504
  if (this.instance.type == 'phoneNumber' || this.instance.type == 'email') {
504
505
  this.controlHasError = true;
505
- if (this.emailCounter == 1) {
506
- let element = document.getElementsByClassName('show-invalid')[0];
507
- element.click();
508
- }
509
- this.emailCounter++;
510
506
  }
511
507
  else {
512
508
  this.controlHasError = this.control.hasError(msg.context.validator);