push latest iteration for perform action
This commit is contained in:
parent
b1fb3f075f
commit
44dad67961
@ -44,14 +44,6 @@ import UIKit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var isTextChanged: Bool = false {
|
|
||||||
didSet {
|
|
||||||
if(isTextChanged) {
|
|
||||||
performDropdownAction()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -94,7 +86,7 @@ import UIKit
|
|||||||
dropDownCaretView.setOptional(with: model.caretView, delegateObject, additionalData)
|
dropDownCaretView.setOptional(with: model.caretView, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func performDropdownAction() {
|
func performDropdownAction() {
|
||||||
if let actionModel = baseDropdownEntryFieldModel?.action, let actionMap = actionModel.toJSON() {
|
if let actionModel = baseDropdownEntryFieldModel?.action, let actionMap = actionModel.toJSON() {
|
||||||
var additionalData = self.additionalData ?? [:]
|
var additionalData = self.additionalData ?? [:]
|
||||||
additionalData[KeySourceModel] = baseDropdownEntryFieldModel
|
additionalData[KeySourceModel] = baseDropdownEntryFieldModel
|
||||||
|
|||||||
@ -101,12 +101,12 @@ import UIKit
|
|||||||
} else {
|
} else {
|
||||||
text = dateDropdownModel?.dateFormatter.string(from: date)
|
text = dateDropdownModel?.dateFormatter.string(from: date)
|
||||||
}
|
}
|
||||||
isTextChanged = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc public override func dismissFieldInput(_ sender: Any?) {
|
@objc public override func dismissFieldInput(_ sender: Any?) {
|
||||||
|
|
||||||
setTextWith(date: datePicker?.date)
|
setTextWith(date: datePicker?.date)
|
||||||
|
performDropdownAction()
|
||||||
super.dismissFieldInput(sender)
|
super.dismissFieldInput(sender)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -138,7 +138,7 @@ extension ItemDropdownEntryField: UIPickerViewDelegate, UIPickerViewDataSource {
|
|||||||
observeDropdownChange?(text ?? "", pickerData[row])
|
observeDropdownChange?(text ?? "", pickerData[row])
|
||||||
text = pickerData[row]
|
text = pickerData[row]
|
||||||
itemDropdownEntryFieldModel?.selectedIndex = row
|
itemDropdownEntryFieldModel?.selectedIndex = row
|
||||||
isTextChanged = true
|
performDropdownAction()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user