File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
PlatformUI/PlatformUI/Components/Input Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 88import SwiftUI
99import Utilities
1010
11- public struct InputSelectOption {
11+ public struct InputSelectOption : Equatable {
1212 public var value : String
1313 public var string : String
1414
@@ -19,7 +19,14 @@ public struct InputSelectOption {
1919}
2020
2121open class PlatformOptionsInputViewModel : PlatformValueInputViewModel {
22- @Published public var options : [ InputSelectOption ] ? // options of values to select from, set at update
22+ @Published public var options : [ InputSelectOption ] ? {
23+ // options of values to select from, set at update
24+ didSet {
25+ if options != oldValue {
26+ value = nil
27+ }
28+ }
29+ }
2330
2431 public var optionTitles : [ String ] ? {
2532 options? . compactMap { $0. string }
You can’t perform that action at this time.
0 commit comments