I have a 2 set of array , 1st with the whole array set, 2nd with the first 10 array (2nd is the displayed in the UI). I have implemented the search for the list view.
But i need to search from the whole list of array.
<form class="searchbar searchbar-init" data-search-list=".list-block-search" data-search-in=".item-title" data-found=".searchbar-found" data-not-found=".searchbar-not-found">
<div class="searchbar-input">
<input type="search" placeholder="Search">
<a href="#" class="searchbar-clear"></a>
</div>
<a href="#" class="searchbar-cancel">Cancel</a>
</form>
You need to initialize the search bar with the customSearch
option set to true
. See: http://framework7.io/docs/searchbar.html
Here is a getting started sample for custom search:
var searchBar = myApp.searchbar('.searchbar', {
customSearch: true,
onSearch: function(s) {
console.log('Searching', s);
},
onClear: function(s) {
console.log('Clearing', s);
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With