-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Made MaxLength property consistent across all platforms #5581
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Just got some questions on how changing the properties affect the others. Maybe we can add a test for this case where toggling the two around does not inadvertently change values.
if (maxLength == 0) | ||
MauiAutoSuggestBox.SetIsReadOnly(platformControl, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the text box below, does it re-enable after reverting MaxLength?
if (maxLength == 0) | ||
textBox.IsReadOnly = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if I set MaxLength to 0 nd then back to 10? Does it re-enable?
Tested iOS/MacCatalyst, working as expected, lgtm on those platforms! |
AFAICT failing tests are unrelated |
Windows SearchBar MaxLength will need some more time #5669 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few questions to make sure we are testing the combinations of properties.
Description of Change
MaxLength property is now consistent across Windows, Android, and iOS for Entry, Editor, and SearchBar! yayyyy :)
MaxLength=-1 behaves as MaxLength=int.MaxValue
MaxLength=0 fields cannot be typed into
MaxLength>0 limits and trims text to the assigned value
Issues Fixed
Fixes #678