-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep filtering items after adapter.updateDataSet(data) #683
Comments
@jurisjansons, are you trying to update the data set with a new one not filtered and then trying to filter? Could you please describe better your use case? |
@jurisjansons, it might be margin for an improvement, I need to understand. |
@davideas Sorry for late response, didn't get first notification about comment. Yes, I am updating data set with new data set and then want to apply filter that is already defined in adapter, so I am not changing it. I guess it skips filtering as you said, because filter hasn't changed. I think calling Provide already filtered data set? Doesn't it mean that I won't be able to clear filter and show unfiltered data set when changing or clearing filter? |
It might be part of the same enhancement of #675. It should be fairly easy: I will analyse it. |
Hi, Have you found a tricks ? I'm trying to do the same things keep my filter applied after a « pull to refresh » without filter my data on the backend side. |
I have decided to use library as a local module and added necessary function myself
|
import library as local module and add just following Function in FlexibleAdapter Class, if you want update or sort your data set and set previos filter again , the code should be look like as following, |
I have a list with items that I filter. Then I want to load new items from server, before that I call
adapter.updateDataSet(null)
to clear list. When I receive data from server I am setting them to adapter with 'adapter.updateDataSet(data)' and it is showing all items without filtering. When I calladapter.getFilter(String.class)
before and after inserting items it returns my filter string and if I calladapter.filterItems()
, after inserting them, nothing happens. How to persist my filter when updating data set?What am I doing wrong?
The text was updated successfully, but these errors were encountered: