-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
If you don't set the detail text for a TextField in Storyboard, it won't appear when set from code later #583
Comments
Thank you for sharing this. Today I am planning to look at the issues with the |
No worries, it is a cool library with a ton of features! ;) |
Yes, takes time to maintain Material, that said, it is a lot of fun to do so :) |
There was an issue when the |
If this is not fixed, could you send me a sample project that I can use as a reference and reproduce the issue? Thank you! |
Hi! In this project I added to TextView. I set the detail property of the first one to a single space in Storyboard and didn't set anyting to the second when. When you click the button below the two TextField, I set the detail and detailColor property for both TextFields from code (as I do in my real app when the validation of a form fails). The detail is displayed for the first TextField but not displayed for the second one. Hope you'll get to find the bug, ask if you need anything else! Thx! |
Thank you for this, I will take a look. I am currently working on both the Textview and TextField. I will follow up with your example and fix very soon :) I appreciate your help very much. |
Fixed the issue :) This was a really good catch, thank you! I am pushing a release now with the fix along with some others, in Material 2.3.10. Also, just incase, your app sample had an issue: textFieldSomething.detail = "Error!"
textFieldSomething.detailColor = UIColor.red
textFieldSomething.detail = "Error!"
textFieldSomething.detailColor = UIColor.red should be textFieldSomething.detail = "Error!"
textFieldSomething.detailColor = UIColor.red
textFieldSomethingElse.detail = "Error!"
textFieldSomethingElse.detailColor = UIColor.red Thank you :) |
Hi! Thx for the fix, I verified and it indeed works now with the latest version. 👍 (An yes, what you found was a copy-paste bug in the sample project, the truth is that when I tried it I only used one TextView and only later added another one to demonstrate the original issue more clearly) 😄 |
No worries :) Thanks for you help. |
I use the detail property of TextFields to display an error message when the validation fails for a TextField. After updating to 2.3.2, it won't appear unless I set it in the Storyboard. But I don't want to display anything unless a validation fails, and it was working before switching to 2.x.
My workaround for now is to set a single space as "details" in the Storyboard.
The text was updated successfully, but these errors were encountered: