You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 13, 2024. It is now read-only.
When using the search bar I get a high CPU usage (100% usage consistently), even when the user has not interacted with the search bar or the app at all. I only tested this on iOS 14.2.1.
Here is an example of how the high CPU usage can be reproduced quite easily:
import SwiftUI
import SwiftlySearch
class SearchViewModel: ObservableObject {
@Published var searchText = ""
}
struct ContentView: View {
@ObservedObject var viewModel = SearchViewModel()
var body: some View {
NavigationView {
List {
Text("foo")
}.navigationBarSearch($viewModel.searchText)
}
}
}
As soon as the .navigationBarSearch is commented out, the high CPU usage disappears.
Am I doing something wrong here or could this be a bug?