CosmicMind / CosmicMind/Material

TextField does't refresh detailLabel

Open
#1,302 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
12k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

If you try to change the color and text in the textField.detailLabel.text, you won't see the change if you dont change the textField.text or focusing the field.

It occurs when the field is not focused and you change the detail text from code.

Pod version:
Material 3.1.8
MaterialComponents 109.4.0

This is my workaround to resolve temporarily my problem:

guard let lastChar = textField.text!.last else {
textField.deleteBackward()
return
}
textField.deleteBackward()
textField.text = textField.text! + String(lastChar)

Have a good day.
Best regards.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.