Skip to content

Commit 219dffa

Browse files
authored
Fix trade execution not updating UI when changing order type (#456)
* Fix build issues with Xcode 26 * Tab bar * Fix trade execution not updating UI when changing order type
1 parent a0e298f commit 219dffa

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

PlatformUI/PlatformUI/Components/Input/PlatformOptionsInput.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import SwiftUI
99
import 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

2121
open 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 }

0 commit comments

Comments
 (0)