Skip to content

TextField does't refresh detailLabel #1302

Open
@AD-Paladins

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions