title: Observe changes on SwiftUI TextField
body: <p>I am playing around with Swift UI. I created a table view (a List) containing all my desired elements. Also the TextField change is working when pressing enter on the keyboard. Nice to build so fast a table view ;).</p>
  
  <p>But now I want to track every change on the textfield. Every time user enter another text I want to send a request which triggers a search.</p>
  
  <p>How could this be done in my code? I read also this documentation here <a href="https://developer.apple.com/documentation/combine/receiving_and_handling_events_with_combine" rel="noreferrer">https://developer.apple.com/documentation/combine/receiving_and_handling_events_with_combine</a></p>
  
  <p>I don't now how to use it in my struct.</p>
  
  <p>The proposed solution here <a href="https://stackoverflow.com/questions/57875550/textfield-changes-in-swiftui">TextField changes in SwiftUI</a> does not work (anymore)</p>
  
  <p>I would be thankful for every hint and every idea you can share with me. I am looking for hours for a solution :(.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>import Foundation
  import SwiftUI
  
  struct MyListView: View {
      @ObservedObject var viewModel: MyViewModel
  
      @State private var query = ""
  
      var body: some View {
  
          NavigationView {
              List {
                  // how to listen for changes here?
                  // if I add onEditingChange here, Get the value only after the user finish search (by pressing enter on the keyboard)
                  TextField(String.localizedString(forKey: "search_bar_hint"), text: self.$query) {
                      self.fetchListing()
                  } 
  
                  ForEach(viewModel.myArray, id: \.id) { arrayObject in
                      MyRow(arrayObj: arrayObject)
                  }
              }
              .navigationBarTitle(navigationBarTitle())
          }
          .onAppear(perform: fetchListing)
      }
  
      private func fetchListing() {
          query.isEmpty ? viewModel.fetchRequest(for: nil) : viewModel.fetchRequest(for: query)
      }
  
      private func navigationBarTitle() -&gt; String {
          return query.isEmpty ? String.localizedString(forKey: "my_title") : query
      }
  }
  </code></pre>