Skip to content

Commit b45eb0b

Browse files
authored
fix: fixed the problem of not being able to search in secondary directories (#338)
* fix: fixed the problem of not being able to search in secondary directories * docs: update changelog
1 parent 57b2a20 commit b45eb0b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/content.en/docs/release-notes/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Information about release notes of Coco Server is provided here.
1919

2020
### Bug fix
2121

22+
- Fixed the problem of not being able to search in secondary directories #338
23+
2224
### Improvements
2325

2426
- refactor: web components #331

src/components/Search/Search.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { useSearchStore } from "@/stores/searchStore";
77
import ContextMenu from "./ContextMenu";
88
import { NoResults } from "@/components/Common/UI/NoResults";
99
import Footer from "@/components/Common/UI/Footer";
10+
1011
interface SearchProps {
1112
isTauri: boolean;
1213
changeInput: (val: string) => void;
@@ -75,15 +76,12 @@ function Search({
7576
const debouncedSearch = useCallback(debounce(getSuggest, 500), [input]);
7677

7778
useEffect(() => {
78-
!isChatMode && !sourceData && debouncedSearch();
79+
!isChatMode && debouncedSearch();
7980
if (!input) setSuggests([]);
8081
}, [input]);
8182

8283
return (
83-
<div
84-
ref={mainWindowRef}
85-
className={`h-full pb-10 w-full relative`}
86-
>
84+
<div ref={mainWindowRef} className={`h-full pb-10 w-full relative`}>
8785
{/* Search Results Panel */}
8886
{suggests.length > 0 ? (
8987
sourceData ? (

0 commit comments

Comments
 (0)