I'm trying to create a single-line text field where text shifts to the left and gets truncated on the left when the text occupies the entire width of the text field.
This is standard behaviour in AppKit NSTextFields when lineBreakMode = .byTruncatingHead:
The default behaviour of TextField is completely broken - both the text field and the cursor does not "follow" the text when it expands beyond the width of the text field:
There is there a way to do this in SwiftUI? If not, is there an alternative is that not user unfriendly? I've tried .truncationMode(.head) but it doesn't seem to do anything.
TextField(text: $strValue) {}
.multilineTextAlignment(.center)
.textFieldStyle(.roundedBorder)
.truncationMode(.head)

