From 5f10e5cb5eaf3f7d1ef077dd073a9111e95f28d6 Mon Sep 17 00:00:00 2001 From: Arpit Date: Tue, 13 Dec 2022 12:16:32 +0530 Subject: [PATCH] searching pages (#4944) --- frontend/src/Editor/LeftSidebar/SidebarPageSelector/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/Editor/LeftSidebar/SidebarPageSelector/index.js b/frontend/src/Editor/LeftSidebar/SidebarPageSelector/index.js index bbadc319c5..6f67b7d586 100644 --- a/frontend/src/Editor/LeftSidebar/SidebarPageSelector/index.js +++ b/frontend/src/Editor/LeftSidebar/SidebarPageSelector/index.js @@ -46,9 +46,8 @@ const LeftSidebarPageSelector = ({ const filterPages = (value) => { if (!value || value.length === 0) return clearSearch(); - const fuse = new Fuse(allpages, { keys: ['name'], threshold: 0.3 }); + const fuse = new Fuse(pages, { keys: ['name'], threshold: 0.3 }); const result = fuse.search(value); - setPages(result.map((item) => item.item)); };