I have the following code to set up binding.
viewModel.searchTerm
.bind(to: searchBar.rx.text)
.disposed(by: self.disposeBag)
Basically I am looking at setting up two way binding between view model property "searchTerm" and the text property of UISearchBar.
The view model property has been defined as below in the viewModel:
var searchTerm = BehaviorRelay<String>(value: "")
This seems to be a one way binding and I do not see the view model property getting updated when user enters a text in the UISearchBar.
How should I modify this to set up two way binding?