In SwiftUI, TextField("", text: $input)
has this automatic behavior, when you press done, the keyboard is dismissed. This is exactly what I wanted with the done button.
However, if you use TextField("", text: $input, axis: .vertical)
the done button will become line change instead, and will no longer dismiss the keyboard.
I need scrollable TextField as TextField("", text: $input, axis: .vertical)
. At the same time, pressing done button to dismiss the keyboard instead of line change. Does anyone knows how to achieve it? Thank you!