SwictfUI TextField setting the selection

I want to select all text in a TextField when the field becomes active


There eems to be no way to bind the selection to a state variable.

I also looked at onEditingChanged but I can't find any documentation on how to change the selection


Question: how can you get/set the selection of a TextView?

SwictfUI TextField setting the selection
 
 
Q