Skip to content

Commit eb6ab21

Browse files
authored
Reenable search functionality for GraphRAG v1.0.0 (#32)
1 parent 343e7ca commit eb6ab21

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/app/components/GraphViewer.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
import FullscreenIcon from "@mui/icons-material/Fullscreen";
2222
import FullscreenExitIcon from "@mui/icons-material/FullscreenExit";
2323
import SearchIcon from "@mui/icons-material/Search";
24+
import DeleteIcon from "@mui/icons-material/Delete";
2425
import Fuse from "fuse.js";
2526
import {
2627
CSS2DRenderer,
@@ -524,10 +525,10 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
524525
? includeTextUnits && includeCommunities && includeCovariates
525526
: includeTextUnits && includeCommunities;
526527

527-
// const clearSearchResults = () => {
528-
// setGraphData(initialGraphData.current);
529-
// setApiSearchResults(null);
530-
// };
528+
const clearSearchResults = () => {
529+
setGraphData(initialGraphData.current);
530+
setApiSearchResults(null);
531+
};
531532

532533
return (
533534
<Box
@@ -880,7 +881,7 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
880881
>
881882
<Typography variant="body2">Nodes: {nodeCount}</Typography>
882883
<Typography variant="body2">Relationships: {linkCount}</Typography>
883-
{/* <Button
884+
<Button
884885
variant="contained"
885886
onClick={toggleApiDrawer(true)}
886887
startIcon={<SearchIcon />}
@@ -895,7 +896,7 @@ const GraphViewer: React.FC<GraphViewerProps> = ({
895896
disabled={apiSearchResults === null}
896897
>
897898
Clear Query Results
898-
</Button> */}
899+
</Button>
899900
</Box>
900901
</Box>
901902
);

0 commit comments

Comments
 (0)