revised selectabel
This commit is contained in:
parent
aca32d14f7
commit
0defd2916a
@ -257,8 +257,10 @@ import UIKit
|
|||||||
if let isLocked = model.locked {
|
if let isLocked = model.locked {
|
||||||
self.isLocked = isLocked
|
self.isLocked = isLocked
|
||||||
|
|
||||||
} else if let isSelected = model.selected {
|
} else if (model.selected ?? false) && !model.wasInitiallySelected {
|
||||||
self.isSelected = isSelected
|
|
||||||
|
model.wasInitiallySelected = true
|
||||||
|
self.isSelected = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,7 @@ import Foundation
|
|||||||
public var fieldKey: String?
|
public var fieldKey: String?
|
||||||
public var groupName: String = FormValidator.defaultGroupName
|
public var groupName: String = FormValidator.defaultGroupName
|
||||||
public var baseValue: AnyHashable?
|
public var baseValue: AnyHashable?
|
||||||
|
public var wasInitiallySelected: Bool = false
|
||||||
|
|
||||||
public var isValid: Bool? {
|
public var isValid: Bool? {
|
||||||
didSet { updateUI?() }
|
didSet { updateUI?() }
|
||||||
|
|||||||
@ -340,8 +340,7 @@ import UIKit
|
|||||||
observingTextFieldDelegate = delegateObject?.observingTextFieldDelegate
|
observingTextFieldDelegate = delegateObject?.observingTextFieldDelegate
|
||||||
setupTextFieldToolbar()
|
setupTextFieldToolbar()
|
||||||
|
|
||||||
if isSelected && !model.wasInitiallySelected {
|
if isSelected {
|
||||||
textEntryFieldModel?.wasInitiallySelected = true
|
|
||||||
startEditing()
|
startEditing()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
public var enabledTextColor: Color = Color(uiColor: .mvmBlack)
|
public var enabledTextColor: Color = Color(uiColor: .mvmBlack)
|
||||||
public var disabledTextColor: Color = Color(uiColor: .mvmCoolGray3)
|
public var disabledTextColor: Color = Color(uiColor: .mvmCoolGray3)
|
||||||
public var type: EntryType?
|
public var type: EntryType?
|
||||||
public var wasInitiallySelected: Bool = false
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user