resetFocus
An action that requests the focus system to reevaluate default focus.
Declaration
var resetFocus: ResetFocusAction { get }Discussion
Get this environment value and call and call it as a function to force a default focus reevaluation at runtime.
@Namespace var mainNamespace
@Environment(\.resetFocus) var resetFocus
var body: some View {
// ...
resetFocus(in: mainNamespace)
// ...
}