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