@ascentgl/ads-ui 0.0.171 → 0.0.172
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.
|
@@ -7587,6 +7587,11 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
7587
7587
|
if (this.valueControl.disabled) {
|
|
7588
7588
|
this.disableControls();
|
|
7589
7589
|
}
|
|
7590
|
+
const originalReset = this.valueControl.reset.bind(this.valueControl);
|
|
7591
|
+
this.valueControl.reset = (...args) => {
|
|
7592
|
+
originalReset(...args);
|
|
7593
|
+
this.handleReset();
|
|
7594
|
+
};
|
|
7590
7595
|
this.valueControl.statusChanges.subscribe((status) => {
|
|
7591
7596
|
if (status === 'DISABLED') {
|
|
7592
7597
|
this.disableControls();
|
|
@@ -7613,6 +7618,10 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
7613
7618
|
this.dropdownControl.disable({ emitEvent: false });
|
|
7614
7619
|
this.inputControl.disable({ emitEvent: false });
|
|
7615
7620
|
}
|
|
7621
|
+
handleReset() {
|
|
7622
|
+
this.dropdownControl.setValue(this.countryOptions[0], { emitEvent: false });
|
|
7623
|
+
this.inputControl.setValue(null, { emitEvent: false });
|
|
7624
|
+
}
|
|
7616
7625
|
/** @ignore */
|
|
7617
7626
|
parsePhoneNumber(fullNumber) {
|
|
7618
7627
|
const trimmed = fullNumber.trim().replace(/\s+/g, ''); // Remove spaces
|