Adding open to required functions, which need to override in MF component.
Adding mapping for dropDown.
This commit is contained in:
parent
3654b05773
commit
f2f9d5d0d7
@ -120,6 +120,7 @@ extension ItemDropdownEntryField {
|
|||||||
|
|
||||||
if let options = dictionary["options"] as? [String] {
|
if let options = dictionary["options"] as? [String] {
|
||||||
pickerData = options
|
pickerData = options
|
||||||
|
setPickerDelegates(delegate: self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import UIKit
|
|||||||
@objcMembers open class MoleculeTableViewCell: TableViewCell {
|
@objcMembers open class MoleculeTableViewCell: TableViewCell {
|
||||||
|
|
||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
public override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
|
|
||||||
guard molecule == nil, let json = json, let moleculeJSON = json.optionalDictionaryForKey(KeyMolecule), let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(forJSON: moleculeJSON, delegateObject: delegateObject, constrainIfNeeded: true) else { return }
|
guard molecule == nil, let json = json, let moleculeJSON = json.optionalDictionaryForKey(KeyMolecule), let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(forJSON: moleculeJSON, delegateObject: delegateObject, constrainIfNeeded: true) else { return }
|
||||||
|
|||||||
@ -110,7 +110,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - MFViewProtocol
|
// MARK: - MFViewProtocol
|
||||||
public func updateView(_ size: CGFloat) {
|
open func updateView(_ size: CGFloat) {
|
||||||
MFStyler.setMarginsFor(self, size: size, defaultHorizontal: updateViewHorizontalDefaults, top: topMarginPadding, bottom: bottomMarginPadding)
|
MFStyler.setMarginsFor(self, size: size, defaultHorizontal: updateViewHorizontalDefaults, top: topMarginPadding, bottom: bottomMarginPadding)
|
||||||
|
|
||||||
if accessoryView != nil {
|
if accessoryView != nil {
|
||||||
@ -133,7 +133,7 @@ import UIKit
|
|||||||
molecule?.updateView(size)
|
molecule?.updateView(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setupView() {
|
open func setupView() {
|
||||||
selectionStyle = .none
|
selectionStyle = .none
|
||||||
insetsLayoutMarginsFromSafeArea = false
|
insetsLayoutMarginsFromSafeArea = false
|
||||||
contentView.insetsLayoutMarginsFromSafeArea = false
|
contentView.insetsLayoutMarginsFromSafeArea = false
|
||||||
@ -141,7 +141,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
public func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
open func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
self.json = json
|
self.json = json
|
||||||
|
|
||||||
guard let json = json else { return }
|
guard let json = json else { return }
|
||||||
@ -186,7 +186,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func reset() {
|
open func reset() {
|
||||||
molecule?.reset?()
|
molecule?.reset?()
|
||||||
updateViewHorizontalDefaults = true
|
updateViewHorizontalDefaults = true
|
||||||
styleStandard()
|
styleStandard()
|
||||||
|
|||||||
@ -37,6 +37,7 @@
|
|||||||
@"caretButton": CaretButton.class,
|
@"caretButton": CaretButton.class,
|
||||||
@"textField": TextEntryField.class,
|
@"textField": TextEntryField.class,
|
||||||
@"digitEntryField": DigitEntryField.class,
|
@"digitEntryField": DigitEntryField.class,
|
||||||
|
@"dropDown": ItemDropdownEntryField.class,
|
||||||
@"itemDropdownEntryField": ItemDropdownEntryField.class,
|
@"itemDropdownEntryField": ItemDropdownEntryField.class,
|
||||||
@"dateDropdownEntryField": DateDropdownEntryField.class,
|
@"dateDropdownEntryField": DateDropdownEntryField.class,
|
||||||
@"mdnEntryField" : MdnEntryField.class,
|
@"mdnEntryField" : MdnEntryField.class,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user