[SwiftUI macOS] TextField formatter is applied only on commit

Originator:flavio
Number:rdar://FB9047243 Date Originated:2021-03-18
Status:Open Resolved:No
Product:SwiftUI Product Version:
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
 
TextField formatter is applied only on commit, not as the user types into the field

Please list the steps you took to reproduce the issue:
===
1. Add a formatter to a TextField
2. Type any text into it
3. The formatter will not be applied
4. Press the return key
5. The formatter will be applied

What did you expect to happen?
===
The formatter should be applied as the user types into the TextField

What actually happened?
===
The formatter is only applied on commit, i.e. when the user presses the return key on the keyboard.

Comments

Example

Check https://github.com/fjcaetano/not-awesome-swiftui


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!