ngx-eiffage-material 0.1.5 → 0.1.6
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.
|
@@ -600,6 +600,7 @@ class NgxBasicSelect {
|
|
|
600
600
|
/** Formulario contenedor, para saber si ya se intentó enviar (reactive o template-driven). */
|
|
601
601
|
_parentFormGroup = inject(FormGroupDirective, { optional: true });
|
|
602
602
|
_parentForm = inject(NgForm, { optional: true });
|
|
603
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
603
604
|
// ─── Inputs ──────────────────────────────────────────────────────────────
|
|
604
605
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
605
606
|
options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
@@ -718,6 +719,17 @@ class NgxBasicSelect {
|
|
|
718
719
|
this.onChange(value);
|
|
719
720
|
this.selectionChange.emit(value);
|
|
720
721
|
});
|
|
722
|
+
/**
|
|
723
|
+
* `submitted` del formulario padre es una propiedad normal, no una señal:
|
|
724
|
+
* al enviar, nada marca este componente (OnPush) para revisión, así que el
|
|
725
|
+
* mat-select no reevaluaba su errorStateMatcher y el campo no se pintaba en
|
|
726
|
+
* rojo. Al enviarse el formulario se fuerza la revisión.
|
|
727
|
+
*/
|
|
728
|
+
const parentSubmit = this._parentFormGroup?.ngSubmit ?? this._parentForm?.ngSubmit;
|
|
729
|
+
parentSubmit?.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
730
|
+
this.innerControl.markAsTouched();
|
|
731
|
+
this._changeDetectorRef.markForCheck();
|
|
732
|
+
});
|
|
721
733
|
}
|
|
722
734
|
// ─── ControlValueAccessor ─────────────────────────────────────────────────
|
|
723
735
|
writeValue(value) {
|
|
@@ -3519,6 +3531,7 @@ class NgxPaginatedSelect {
|
|
|
3519
3531
|
/** Formulario contenedor, para saber si ya se intento enviar (reactive o template-driven). */
|
|
3520
3532
|
_parentFormGroup = inject(FormGroupDirective, { optional: true });
|
|
3521
3533
|
_parentForm = inject(NgForm, { optional: true });
|
|
3534
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
3522
3535
|
intl = inject(NgxTablesIntl);
|
|
3523
3536
|
// ─── Inputs ────────────────────────────────────────────────────────────────
|
|
3524
3537
|
/** Label that floats on the form field */
|
|
@@ -3653,6 +3666,16 @@ class NgxPaginatedSelect {
|
|
|
3653
3666
|
}
|
|
3654
3667
|
untracked(() => this.emitChange(items));
|
|
3655
3668
|
});
|
|
3669
|
+
/**
|
|
3670
|
+
* `submitted` del formulario padre es una propiedad normal, no una senal:
|
|
3671
|
+
* al enviar, nada marca este componente (OnPush) para revision, asi que el
|
|
3672
|
+
* control interno no reevaluaba su errorStateMatcher y el campo no se
|
|
3673
|
+
* pintaba en rojo. Al enviarse el formulario se fuerza la revision.
|
|
3674
|
+
*/
|
|
3675
|
+
const parentSubmit = this._parentFormGroup?.ngSubmit ?? this._parentForm?.ngSubmit;
|
|
3676
|
+
parentSubmit?.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
3677
|
+
this._changeDetectorRef.markForCheck();
|
|
3678
|
+
});
|
|
3656
3679
|
}
|
|
3657
3680
|
// ─── ControlValueAccessor ───────────────────────────────────────────────────
|
|
3658
3681
|
writeValue(value) {
|