base value issue fixed

This commit is contained in:
Damodaram 2020-07-30 17:36:40 +05:30
parent 8b48725c51
commit 579648a585

View File

@ -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 {