Skip to content

Commit

Permalink
Reenable search functionality for GraphRAG v1.0.0 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
noworneverev authored Dec 27, 2024
1 parent 343e7ca commit eb6ab21
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/app/components/GraphViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import FullscreenIcon from "@mui/icons-material/Fullscreen";
import FullscreenExitIcon from "@mui/icons-material/FullscreenExit";
import SearchIcon from "@mui/icons-material/Search";
import DeleteIcon from "@mui/icons-material/Delete";
import Fuse from "fuse.js";
import {
CSS2DRenderer,
Expand Down Expand Up @@ -524,10 +525,10 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
? includeTextUnits && includeCommunities && includeCovariates
: includeTextUnits && includeCommunities;

// const clearSearchResults = () => {
// setGraphData(initialGraphData.current);
// setApiSearchResults(null);
// };
const clearSearchResults = () => {
setGraphData(initialGraphData.current);
setApiSearchResults(null);
};

return (
<Box
Expand Down Expand Up @@ -880,7 +881,7 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
>
<Typography variant="body2">Nodes: {nodeCount}</Typography>
<Typography variant="body2">Relationships: {linkCount}</Typography>
{/* <Button
<Button
variant="contained"
onClick={toggleApiDrawer(true)}
startIcon={<SearchIcon />}
Expand All @@ -895,7 +896,7 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
disabled={apiSearchResults === null}
>
Clear Query Results
</Button> */}
</Button>
</Box>
</Box>
);
Expand Down

0 comments on commit eb6ab21

Please sign in to comment.