From 6ab5eec0897a9cd2a9bdee070ea81e0f467eb9b3 Mon Sep 17 00:00:00 2001 From: nv404 <nvnamanvyas@gmail.com> Date: Thu, 26 Dec 2024 17:36:31 +0530 Subject: [PATCH] feature: search includes url --- packages/bruno-app/src/utils/collections/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/utils/collections/search.js b/packages/bruno-app/src/utils/collections/search.js index 9c2f187e59..6a6a69ff10 100644 --- a/packages/bruno-app/src/utils/collections/search.js +++ b/packages/bruno-app/src/utils/collections/search.js @@ -3,7 +3,10 @@ import filter from 'lodash/filter'; import find from 'lodash/find'; export const doesRequestMatchSearchText = (request, searchText = '') => { - return request?.name?.toLowerCase().includes(searchText.toLowerCase()); + const lowerSearchText = searchText.toLowerCase(); + const nameMatch = request?.name?.toLowerCase().includes(lowerSearchText); + const urlMatch = request?.request?.url?.toLowerCase().includes(lowerSearchText); + return nameMatch || urlMatch; }; export const doesFolderHaveItemsMatchSearchText = (item, searchText = '') => {