Noticed different behavior in a couple of text fields with number formatters. On one I could type an aperture (e.g. 5.6) and it only finalizes the formatting on submit. The other is greedy and tries to format as you type, so that 5.6 ends up as f/56.

I tracked it down to different flows for handling selection. The misbehaving one has a direct database query in the view, so I think when the model changes the view invalidates, and the text field formats

#SwiftUI #GRDB

The other view is given an array of models that's created by a query upstream. Interestingly the text field updates correctly when the model is changed from another part of the app, which is good. Might need to move the other query upstream a bit so they behave the same way