When I search the green color on the search box the result would be Cauliflower, Capsicum. The same if I type carrot it displays only carrot.
I need search functionality for both title and description.
Currently, easy autocomplete performs either title or description and not both. Is there any possibility to do these multiple functions?
var options = {
data: [
{ title: "Carrot", description: "It is orange color veg", type: "ground" },
{ title: "beetroot", description: "It is dark red color veg", type: "ground" },
{ title: "Cauliflower", description: "It is green color veg", type: "ground" },
{ title: "Capsicum ", description: "It is green color veg", type: "ground" }
],
getValue: "name",
template: {
type: "description",
fields: {
description: "type"
}
}
};
$("#template-desc").easyAutocomplete(options);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/easy-autocomplete/1.3.5/jquery.easy-autocomplete.min.js" integrity="sha512-Z/2pIbAzFuLlc7WIt/xifag7As7GuTqoBbLsVTgut69QynAIOclmweT6o7pkxVoGGfLcmPJKn/lnxyMNKBAKgg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/easy-autocomplete/1.3.5/easy-autocomplete.min.css" integrity="sha512-TsNN9S3X3jnaUdLd+JpyR5yVSBvW9M6ruKKqJl5XiBpuzzyIMcBavigTAHaH50MJudhv5XIkXMOwBL7TbhXThQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<input id="template-desc" />