ionic 4 search bar code example
Example 1: ionic search
<ion-searchbar></ion-searchbar>
<ion-searchbar showCancelButton="always"></ion-searchbar>
<ion-searchbar showCancelButton="never"></ion-searchbar>
<ion-searchbar showCancelButton="focus"></ion-searchbar>
<ion-searchbar color="danger"></ion-searchbar>
<ion-searchbar value="Ionic"></ion-searchbar>
<ion-searchbar type="tel"></ion-searchbar>
<ion-searchbar inputmode="numeric"></ion-searchbar>
<ion-searchbar disabled="true"></ion-searchbar>
<ion-searchbar showCancelButton="focus" cancelButtonText="Custom Cancel"></ion-searchbar>
<ion-searchbar debounce="500"></ion-searchbar>
<ion-searchbar animated></ion-searchbar>
<ion-searchbar placeholder="Filter Schedules"></ion-searchbar>
<ion-toolbar>
<ion-searchbar></ion-searchbar>
</ion-toolbar>
Example 2: Angular ion-search
filterItems(searchTerm) {
return this.items.filter(item => {
return item.title.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1;
});
}