From ee773eed89ac2e3e71cd743f6497e24deb65591b Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 27 Nov 2019 15:02:03 -0500 Subject: [PATCH] key change --- MVMCoreUI/Atoms/Views/DropDown.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/DropDown.swift b/MVMCoreUI/Atoms/Views/DropDown.swift index 88d0a2c2..929bd67f 100644 --- a/MVMCoreUI/Atoms/Views/DropDown.swift +++ b/MVMCoreUI/Atoms/Views/DropDown.swift @@ -30,17 +30,17 @@ import UIKit textField.inputView = picker picker.reloadAllComponents() MVMCoreUICommonViewsUtility.addDismissToolbar(textField, delegate: delegateObject?.uiTextFieldDelegate) - textField.text = json?.stringWithChainOfKeysOrIndexes([KeyValue,picker.selectedRow(inComponent: 0)]) + textField.text = json?.stringWithChainOfKeysOrIndexes(["options",picker.selectedRow(inComponent: 0)]) } } extension DropDown: UIPickerViewDelegate { public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { - return json?.stringWithChainOfKeysOrIndexes([KeyValue,row]) + return json?.stringWithChainOfKeysOrIndexes(["options",row]) } public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { - textField?.text = json?.stringWithChainOfKeysOrIndexes([KeyValue,row]) + textField?.text = json?.stringWithChainOfKeysOrIndexes(["options",row]) } } @@ -50,6 +50,6 @@ extension DropDown: UIPickerViewDataSource { } public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { - return json?.optionalArrayForKey(KeyValue)?.count ?? 0 + return json?.optionalArrayForKey("options")?.count ?? 0 } }