How to show an message if product is not found after searh
below my code
getItems(ev) {
// Reset items back to all of the items
this.initializeItems();
console.log(ev);
// set val to the value of the ev target
var val = ev.target.value;
console.log(val)
// if the value is an empty string don't filter the items
if (val && val.trim() != '') {
this.serarchProduct = this.serarchProduct.filter((item) => {
return (item.product_name.toLowerCase().indexOf(val.toLowerCase()) > -1);
})
}
}
Please help me out
any help would be highly appreciated
Thanks