Skip to content

Commit

Permalink
Don't show filtered probes on search (#2903)
Browse files Browse the repository at this point in the history
  • Loading branch information
edugfilho authored Jul 25, 2024
1 parent 95a1590 commit 5ac6415
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/search/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
searchIsActive = false;
}
function filteredResults(rawResults) {
const regex =
/search_counts|browser_search|event_counts|browser_engagement_navigation|manager_message_size|dropped_frames_proportion/;
const filtered = rawResults.filter((item) => !regex.test(item.name));
return filtered;
}
async function onKeypress({ key }) {
if (searchIsActive) {
if (key === 'Escape') {
Expand All @@ -43,7 +51,7 @@
const handleSearchInput = debounce((value) => {
query = value;
getSearchResults($store.searchProduct, query).then((r) => {
results = r;
results = filteredResults(r);
searchWaiting = false;
});
searchIsActive = true;
Expand Down

0 comments on commit 5ac6415

Please sign in to comment.