Animation is glitching when I tap on search bar
Below is the code
struct CustomTabBar: View {
@State var searchText = ""
var data = [1,2,3,4,5,6,7,8,9,10]
var body: some View {
NavigationStack {
ScrollView(.vertical) {
ForEach(data, id: \.self) { d in
box
}
}
.navigationTitle("Search")
.searchable(text: $searchText)
}
}
var box: some View {
Rectangle()
.frame(width: 75, height: 50)
.cornerRadius(10)
}
}