From 5c259ab4c7acc5391f83b227c9b02f17a3591052 Mon Sep 17 00:00:00 2001 From: TeshuKatepalli Date: Wed, 20 Sep 2023 14:19:49 +0530 Subject: [PATCH] Updated header js file --- blocks/header/header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/header/header.js b/blocks/header/header.js index 5335f60..575945a 100644 --- a/blocks/header/header.js +++ b/blocks/header/header.js @@ -178,7 +178,7 @@ export default async function decorate(block) { // Perform a search based on the fetched JSON data const results = jsonData.data.filter(item => { // Customize this condition to match your search criteria - return item.description.toLowerCase().includes(searchTerm); + return item.title.toLowerCase().includes(searchTerm); }); console.log(results); const resultBlock = document.querySelector('.search-results'); // Use .search-results for class selector