comment
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
5ebdbd24f1
commit
66464cebc3
@ -115,30 +115,6 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
|
||||
}.store(in: &subscribers)
|
||||
}
|
||||
|
||||
open override func updateView() {
|
||||
super.updateView()
|
||||
switch viewModel.type {
|
||||
case .secure, .password:
|
||||
textView.isSecureTextEntry = true
|
||||
textView.shouldMaskWhileRecording = true
|
||||
|
||||
case .numberSecure:
|
||||
textView.isSecureTextEntry = true
|
||||
textView.keyboardType = .numberPad
|
||||
textView.shouldMaskWhileRecording = true
|
||||
|
||||
case .number:
|
||||
textView.keyboardType = .numberPad
|
||||
|
||||
case .email:
|
||||
textView.keyboardType = .emailAddress
|
||||
//uncomment out once inputField branch is merged and update this logic
|
||||
// case .securityCode, .creditCard:
|
||||
// textView.shouldMaskWhileRecording = true
|
||||
|
||||
default: break
|
||||
}
|
||||
}
|
||||
open func viewModelDidUpdate() {
|
||||
|
||||
text = viewModel.text
|
||||
@ -171,6 +147,28 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
|
||||
isEditting = true
|
||||
}
|
||||
|
||||
switch viewModel.type {
|
||||
case .secure, .password:
|
||||
textView.isSecureTextEntry = true
|
||||
textView.shouldMaskWhileRecording = true
|
||||
|
||||
case .numberSecure:
|
||||
textView.isSecureTextEntry = true
|
||||
textView.keyboardType = .numberPad
|
||||
textView.shouldMaskWhileRecording = true
|
||||
|
||||
case .number:
|
||||
textView.keyboardType = .numberPad
|
||||
|
||||
case .email:
|
||||
textView.keyboardType = .emailAddress
|
||||
//uncomment out once inputField branch is merged and update this logic
|
||||
// case .securityCode, .creditCard:
|
||||
// textView.shouldMaskWhileRecording = true
|
||||
|
||||
default: break
|
||||
}
|
||||
|
||||
/// append any internal rules:
|
||||
viewModel.rules = rules
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user