Repository navigation
fix: move the length limit when the controller changes country - #366
Open
KuljeetSinghXDA wants to merge 1 commit into
Open
KuljeetSinghXDA wants to merge 1 commit into
KuljeetSinghXDA wants to merge 1 commit into
Conversation
Accepted: ready to mergeFixes national number truncation by updating the length limit when the controller changes the selected country Merging stays manual here: this repository does not merge automatically. Written by a model reading the diff against |
2 tasks done
With shouldLimitLengthByCountry enabled the maximum length was computed in initState and after a country was picked in the selector. When the controller changed the country (changeCountry or an assigned value) the old limit stayed. The text field then cut digits that are valid for the new country, for example a 10 digit US number typed after switching from France was reduced to 9 digits. The controller listener now recomputes the limit before the value is synced to the form field.
Contributor
Author
|
Same version fix as #365, thanks for flagging it. Bumped |
KuljeetSinghXDA
force-pushed
the
fix/limit-length-country-change
branch
from
November 18, 2026 12:38
5142d78 to
e2136a5
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
shouldLimitLengthByCountry: truethe maximum length is computed ininitStateand after a country is picked in the selector. When the controller changes the country itself, the old length stays and the text field cuts valid digits.The 10th digit is dropped by
LimitMaxLengthFormatterbecause it still holds the French limit._maxValidLengthbefore the value is synced to the form field.mainwithnsn: 416555123.Checks run locally:
Checklist: