Reloading a Virtual List when a user goes 'back' with search term


#1

Hello,

I have an app that utilizes a Virtual List, and when they choose an option from the list they go to a page where they can fill in a form and make changes to the data on the server. When they go back, or submit the form it goes back to the page with the Virtual List, and the Virtual List reloads (which is good, I want the data refreshed) but the search term in the box is not being filtered by anymore. The user has to go back to the search box and either delete/add a character to make it filter again. Is there a way when a virtual list it will automatically filter by what’s in the search box?

Thank you


#2

You need to trigger Searchbar to do the search again on VL reload, e.g. calling searchbar.search(searchbar.query) method https://framework7.io/docs/searchbar.html#searchbar-methods-properties