Skip to content

Fix reset input#93

Open
Capelinha wants to merge 1 commit intotanansatpal:masterfrom
Capelinha:fix/reset-input
Open

Fix reset input#93
Capelinha wants to merge 1 commit intotanansatpal:masterfrom
Capelinha:fix/reset-input

Conversation

@Capelinha
Copy link
Copy Markdown

When I call the component's .reset() the phone number remains in the field

@tanansatpal
Copy link
Copy Markdown
Owner

@Capelinha this seems to work fine for me without the fix. In the test code as well, when I click the reset button, the values get cleared for the entire form, even this component.
Can you maybe put up a stackblitz, so that we can verify it again

@hohler
Copy link
Copy Markdown

hohler commented Jan 26, 2021

For me, NgxMatIntlTelInputComponent.reset() works. But when I use Reactive Forms and do a reset() on the FormControl, it will not clear the input field. Is this a known issue?

@Capelinha
Copy link
Copy Markdown
Author

Capelinha commented Jan 29, 2021

@hohler @tanansatpal Yes, my problem is related to reactive forms. The .reset() does not clear the field

@jaradehr1
Copy link
Copy Markdown

Any updates on this pull request?

Can't reset my phone input with reactive form..

@Lerado
Copy link
Copy Markdown

Lerado commented Jul 27, 2022

For me, NgxMatIntlTelInputComponent.reset() works. But when I use Reactive Forms and do a reset() on the FormControl, it will not clear the input field. Is this a known issue?

Same here. Reactive Forms reset does not reset the tel input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants