Open derwing opened 3 years ago
you can reset the component directly
@ViewChild('phoneInput')
phoneInput: NgxMatIntlTelInputComponent;
public resetForm(): void {
this.form.reset();
this.phoneInput.reset();
}
Thanks!
Will be fixed once this pull request have been merged.
Or already online on this library
Will be fixed once this pull request have been merged.
Or already online on this library
Hi @rbalet , thanks for the link. I'm trying to use your library but I'm facing an error:
Error: node_modules/ngx-mat-input-tel/lib/ngx-mat-input-tel.component.d.ts:89:97 - error TS2344: Type '{ preferredCountries: { alias: "preferredCountries"; required: false; }; enablePlaceholder: { alias: "enablePlaceholder"; required: false; }; inputPlaceholder: { alias: "inputPlaceholder"; required: false; }; ... 10 more ...; disabled: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"preferredCountries"' is incompatible with index signature.
Type '{ alias: "preferredCountries"; required: false; }' is not assignable to type 'string'.
I am asking here since I cannot post an issue directly on your library's github.
I tried with the latest version and also with the first one > same error.
I am using angular 15.1.1
Could you help me?
Hi @hobojoe. You shall now be able to create an issue on my fork. May be cleaner that way :).
But as I can read what you've posted, it may be due to my code enforcing you to pass some variable. Since I did us strictTemplate: true in the tsconfig
I removed it and enhanced the code a little bit in the latest v16.1.7
Let me now
Hi @hobojoe. You shall now be able to create an issue on my fork. May be cleaner that way :).
But as I can read what you've posted, it may be due to my code enforcing you to pass some variable. Since I did us strictTemplate: true in the tsconfig
I removed it and enhanced the code a little bit in the latest v16.1.7
Let me now
Hi, unfortunately the error persisted. I've just created an issue on your own repo. Thanks!
This is my html -
I use
this.addressForm.reset();
--- for reset my form All fields are cleaned less ngx-mat-intl-tel-input