added delegates
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
981bdac292
commit
79d5529991
@ -9,7 +9,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
import VDS
|
import VDS
|
||||||
|
|
||||||
open class ItemDropdownEntryField: VDS.DropdownSelect, VDSMoleculeViewProtocol {
|
open class ItemDropdownEntryField: VDS.DropdownSelect, VDSMoleculeViewProtocol, ObservingTextFieldDelegate {
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
@ -42,6 +42,23 @@ open class ItemDropdownEntryField: VDS.DropdownSelect, VDSMoleculeViewProtocol {
|
|||||||
/// When selecting for first responder, allow initial selected value to appear in empty text field.
|
/// When selecting for first responder, allow initial selected value to appear in empty text field.
|
||||||
public var setInitialValueInTextField = true
|
public var setInitialValueInTextField = true
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Delegate Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
/// The delegate and block for validation. Validates if the text that the user has entered.
|
||||||
|
public weak var observingTextFieldDelegate: ObservingTextFieldDelegate?
|
||||||
|
|
||||||
|
/// If you're using a ViewController, you must set this to it
|
||||||
|
open weak var uiTextFieldDelegate: UITextFieldDelegate? {
|
||||||
|
get { dropdownField.delegate }
|
||||||
|
set { dropdownField.delegate = newValue }
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc public func dismissFieldInput(_ sender: Any?) {
|
||||||
|
_ = resignFirstResponder()
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user