updated placeholder logic
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d7086b0702
commit
d943202e83
@ -45,11 +45,7 @@ open class TextView: UITextView, ViewProtocol, Errorable {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
open var placeholder: String? {
|
||||
didSet {
|
||||
placeholderLabel.text = placeholder
|
||||
}
|
||||
}
|
||||
open var placeholder: String? { didSet { setNeedsUpdate() } }
|
||||
|
||||
open var placeholderLabel = Label().with {
|
||||
$0.textColorConfiguration = ViewColorConfiguration().with {
|
||||
@ -319,8 +315,9 @@ open class TextView: UITextView, ViewProtocol, Errorable {
|
||||
attributedText = nil
|
||||
}
|
||||
placeholderLabel.textStyle = textStyle
|
||||
placeholderLabel.isHidden = !text.isEmpty
|
||||
placeholderLabel.surface = surface
|
||||
placeholderLabel.text = placeholder
|
||||
placeholderLabel.isHidden = !text.isEmpty
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user