I\'m working on a project in android for a udacity course I\'m currently trying to implement a search function while adhering to android architecture components and using fi
you can use Transformation.switchMap to do search operations.
In viewmodel create MutableLiveData which has latest search string.
Inside viewmodel use:
LiveData data =
LiveDataTransformations.switchMap(searchStringLiveData, string ->
repo.loadData(string)))