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
Feature request: Use controller with CardSettingsPhone #11
Comments
This is because the CardSettingsPhone widget hard codes the phone mask string and sends that over to a CardSettingsText widget. That in turn uses a third part controller, MaskedTextController, to govern the formatting. Passing in your own controller would thus eliminate the ability for the phone widget to format the contexts as a phone number. The assert error is there to block this usage. Off the top of my head I'm not sure what an elegant fix would be. Maybe it could be made to allow passing in your own MaskedTextController... Another fix would be to use the CardTextController instead and pass in your own MaskedTextController and an input string and you should be good to go. CardSettingPhone is just a shortcut to avoid this customization. |
Anyway, I have to store my phone number in String, not int because we can have +XX in Europe, I don't know about united states. For now I use a text field with a custom validator |
An optional country code is a nice idea to improve this. It would require a complete overhaul in how formatting works. What is the issue of it becoming an integer? +1 (800) 555-1212 -> 18005551212 |
Phone numbers can start with 0 and + in France :p
Le jeu. 16 août 2018 04:06, Jeff Jorczak <notifications@github.com> a
écrit :
… An optional country code is a nice idea to improve this. It would require
a complete overhaul in how formatting works. What is the issue of it
becoming an integer?
+1 (800) 555-1212 -> 18005551212
(800) 555-1212 -> 8005551212
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AahqbfRjOPnqNYwLdpdDQ8FKQuDUHEguks5uRNOSgaJpZM4V9496>
.
|
Is the workaround still working? |
Dunno man sorry... its been a while since
Le ven. 15 févr. 2019 à 21:54, Rody Davis <notifications@github.com> a
écrit :
… Is the workaround still working?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AahqbXTL0DFYgFfjHTzMCVISe5EhCM-Xks5vNx53gaJpZM4V9496>
.
|
Closing for now |
My function creating a phone field is the following:
Here is the console output:
A workaround is to instanciate my CardSettingsPhone like this:
But I don't really like it and sometimes the last characters are not updated and I don't understand why...
The text was updated successfully, but these errors were encountered: