mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-24 07:19:23 +01:00
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
This commit is contained in:
@@ -19,6 +19,8 @@ Information about release notes of Coco Server is provided here.
|
|||||||
|
|
||||||
### Bug fix
|
### Bug fix
|
||||||
|
|
||||||
|
- Fixed the problem of not being able to search in secondary directories #338
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
|
||||||
- refactor: web components #331
|
- refactor: web components #331
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useSearchStore } from "@/stores/searchStore";
|
|||||||
import ContextMenu from "./ContextMenu";
|
import ContextMenu from "./ContextMenu";
|
||||||
import { NoResults } from "@/components/Common/UI/NoResults";
|
import { NoResults } from "@/components/Common/UI/NoResults";
|
||||||
import Footer from "@/components/Common/UI/Footer";
|
import Footer from "@/components/Common/UI/Footer";
|
||||||
|
|
||||||
interface SearchProps {
|
interface SearchProps {
|
||||||
isTauri: boolean;
|
isTauri: boolean;
|
||||||
changeInput: (val: string) => void;
|
changeInput: (val: string) => void;
|
||||||
@@ -75,15 +76,12 @@ function Search({
|
|||||||
const debouncedSearch = useCallback(debounce(getSuggest, 500), [input]);
|
const debouncedSearch = useCallback(debounce(getSuggest, 500), [input]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
!isChatMode && !sourceData && debouncedSearch();
|
!isChatMode && debouncedSearch();
|
||||||
if (!input) setSuggests([]);
|
if (!input) setSuggests([]);
|
||||||
}, [input]);
|
}, [input]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div ref={mainWindowRef} className={`h-full pb-10 w-full relative`}>
|
||||||
ref={mainWindowRef}
|
|
||||||
className={`h-full pb-10 w-full relative`}
|
|
||||||
>
|
|
||||||
{/* Search Results Panel */}
|
{/* Search Results Panel */}
|
||||||
{suggests.length > 0 ? (
|
{suggests.length > 0 ? (
|
||||||
sourceData ? (
|
sourceData ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user