-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two way binding of phone number is one way only #9
Comments
Thanks for feedback, but actually this is 'by design', but I have to admit this is a bit weird. I had made this little lib in a quick way to integrate it in a project. Givin the ability to set the value in the field is a bit tedious, because we need to target the intl-tel-input main API after the component initialization, which happens once the DOM is ready, in Marking this as feature request, will see if I have time to make this feature later. Thanks again! |
i mean you can do the following:
....
with this the following should work fine |
If you try this as is, you will see that this leads to problems. The difficulty is not to make the double binding of the phone value work, the problem is making things happen AFTER values binding in the The lib has a promise we can rely on but it makes things a bit tedious to implement. (but not that much I think) But PR are of course welcome to implement this feature. |
Hello, Any updates on this? |
Expected behavior
The end user should be able to change an existing phone number.
Two way binding of the
intl-tel-input
should accept input.Actual behavior
When I pass an existing value into the component like this:
[(E164PhoneNumber)]="data.mobile"
, the value is never set in the field.Steps to reproduce
TS:
data = {mobile: '+41791234567'};
HTML:
<intl-tel-input name="mobile" [(E164PhoneNumber)]="data.mobile" required></intl-tel-input>
intl-tel-input-ng version
0.0.7 & 0.1.0
The text was updated successfully, but these errors were encountered: