I have the following code:
enum ContentViewRouter {
case details
}
struct ContentView: View {
var body: some View {
NavigationStack {
ZStack {
NavigationLink(value: ContentViewRouter.details) {
Text("Push")
}
}
.navigationDestination(for: ContentViewRouter.self) { destiantion in
switch destiantion {
case .details:
DetailsView()
}
}
.navigationTitle("TEST")
}
}
}
struct DetailsView: View {
@State var query = ""
var body: some View {
Form {
Section("TEST") {
Text("DETAILS")
}
}
.searchable(text: $query)
.navigationTitle("DETAILS")
}
}
When pushing the details view it creates this animation:
I want to get rid of this weird looking animation "glitch":
How can I get the push animation to come in smooth where the search bar doesn't appear for a split second and then go away? Seems like it's a bug or I am doing it wrong?