From 579648a5856f63e6da1a6eba925e243a9e3bc0f7 Mon Sep 17 00:00:00 2001 From: Damodaram <> Date: Thu, 30 Jul 2020 17:36:40 +0530 Subject: [PATCH] base value issue fixed --- .../FormFields/TextFields/ItemDropdownEntryFieldModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/ItemDropdownEntryFieldModel.swift b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/ItemDropdownEntryFieldModel.swift index 979fac4d..d89f5e16 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/ItemDropdownEntryFieldModel.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/ItemDropdownEntryFieldModel.swift @@ -45,6 +45,7 @@ if let selectedIndex = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedIndex) { self.selectedIndex = selectedIndex } + baseValue = options.indices.contains(selectedIndex) ? options[selectedIndex] : nil } public override func encode(to encoder: Encoder) throws {