fixed bug in InputField/TextArea after refactor
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
b07c010888
commit
994feff20e
@ -78,11 +78,13 @@ open class InputField: EntryFieldBase, UITextFieldDelegate {
|
||||
/// Representing the type of input.
|
||||
open var fieldType: FieldType = .text { didSet { setNeedsUpdate() } }
|
||||
|
||||
/// The text of this textField.
|
||||
/// The text of this TextField.
|
||||
private var _text: String?
|
||||
open var text: String? {
|
||||
get { textField.text }
|
||||
get { _text }
|
||||
set {
|
||||
if let newValue, newValue != text {
|
||||
if let newValue, newValue != _text {
|
||||
_text = newValue
|
||||
textField.text = newValue
|
||||
value = newValue
|
||||
}
|
||||
|
||||
@ -107,10 +107,12 @@ open class TextArea: EntryFieldBase {
|
||||
}
|
||||
|
||||
/// The text of this TextArea.
|
||||
private var _text: String?
|
||||
open var text: String? {
|
||||
get { textView.text }
|
||||
get { _text }
|
||||
set {
|
||||
if let newValue, newValue != text {
|
||||
if let newValue, newValue != _text {
|
||||
_text = newValue
|
||||
textView.text = newValue
|
||||
value = newValue
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user