In SwiftUI's List
, on macOS, if I embed a TextField
then the text field is presented as non-editable. If the user clicks on the text and waits a short period of time, the text field will become editable.
I'm aware this is generally the correct behaviour for macOS. However, is there a way in SwiftUI to supress this behaviour such that the TextField is always presented as being editable?
I want a scrollable, List
of editable text fields, much like how a Form
is presented. The reason I'm not using a Form
is because I want List's
support for reordering by drag-and-drop (.onMove
).
Use Case
A view that allows a user to compose a questionnaire. They are able to add and remove questions (rows) and each question is editable. They require drag-and-drop support so that they can reorder the questions.