When putting a ScrollView inside a NavigationView, that uses the searchable view modifier, focusing and unfocusing the search bar causes the ScrollView to jump immediately instead of smoothly animating as a List view would do.
The code below produces the behaviour in the GIF above.
struct TestView: View {
@State
private var term = ""
var body: some View {
NavigationView {
ScrollView {
VStack {
Text("Bar")
Text("Baz")
}
}
.navigationTitle("Foo")
}
.searchable(text: $term)
}
}
This seems like a SwiftUI bug to me? Is there any workaround?
