SwiftUI TextField is locked when user enters data


When I develop ios app, I have a problem. TextField is locked when user enters data.

The solution is:

TextField("", text: $searchText, prompt: Text("Search").foregroundColor(.white))

                .autocorrectionDisabled(true)    //This attribute is key

                .foregroundColor(.white)

                .padding(.vertical, 10)

                .padding(.trailing, 10)