Adding open to required functions, which need to override in MF component.

Adding mapping for dropDown.
This commit is contained in:
Khan, Arshad 2019-11-27 21:12:41 +05:30
parent 3654b05773
commit f2f9d5d0d7
4 changed files with 7 additions and 5 deletions

View File

@ -120,6 +120,7 @@ extension ItemDropdownEntryField {
if let options = dictionary["options"] as? [String] {
pickerData = options
setPickerDelegates(delegate: self)
}
}
}

View File

@ -11,7 +11,7 @@ import UIKit
@objcMembers open class MoleculeTableViewCell: TableViewCell {
// 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)
guard molecule == nil, let json = json, let moleculeJSON = json.optionalDictionaryForKey(KeyMolecule), let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(forJSON: moleculeJSON, delegateObject: delegateObject, constrainIfNeeded: true) else { return }

View File

@ -110,7 +110,7 @@ import UIKit
}
// MARK: - MFViewProtocol
public func updateView(_ size: CGFloat) {
open func updateView(_ size: CGFloat) {
MFStyler.setMarginsFor(self, size: size, defaultHorizontal: updateViewHorizontalDefaults, top: topMarginPadding, bottom: bottomMarginPadding)
if accessoryView != nil {
@ -133,7 +133,7 @@ import UIKit
molecule?.updateView(size)
}
public func setupView() {
open func setupView() {
selectionStyle = .none
insetsLayoutMarginsFromSafeArea = false
contentView.insetsLayoutMarginsFromSafeArea = false
@ -141,7 +141,7 @@ import UIKit
}
// 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
guard let json = json else { return }
@ -186,7 +186,7 @@ import UIKit
}
}
public func reset() {
open func reset() {
molecule?.reset?()
updateViewHorizontalDefaults = true
styleStandard()

View File

@ -37,6 +37,7 @@
@"caretButton": CaretButton.class,
@"textField": TextEntryField.class,
@"digitEntryField": DigitEntryField.class,
@"dropDown": ItemDropdownEntryField.class,
@"itemDropdownEntryField": ItemDropdownEntryField.class,
@"dateDropdownEntryField": DateDropdownEntryField.class,
@"mdnEntryField" : MdnEntryField.class,