File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1212//* ============================================================================*
1313
1414/// A message describing which properties should be updated.
15+ ///
16+ /// It is recommended to update the value first, then the text before selection.
17+ ///
18+ /// - Implement reentrant updates by only updating the value until it stabilizes.
19+ ///
1520@frozen public struct Update : OptionSet {
16-
17- public static let text = Self ( rawValue: 1 << 0 )
18- public static let selection = Self ( rawValue: 1 << 1 )
19- public static let value = Self ( rawValue: 1 << 2 )
21+
22+ public static let value = Self ( rawValue: 1 << 0 )
23+ public static let text = Self ( rawValue: 1 << 1 )
24+ public static let selection = Self ( rawValue: 1 << 2 )
2025
2126 //=------------------------------------------------------------------------=
2227
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
272272 // Value
273273 //=----------------------------------=
274274 if let _ = self . update. remove ( . value) {
275- self . upstream. value = self . context. value
275+ self . upstream. value = context. value
276276 //=------------------------------=
277277 // Reentrance
278278 //=------------------------------=
You can’t perform that action at this time.
0 commit comments