Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions packages/graph-explorer/src/hooks/useExpandNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ export default function useExpandNode() {

// No neighbors to add
if (result.vertices.length + result.edges.length <= 0) {
toast.info("No more neighbors to expand");
const hasAttributeFilters = (request.attributeFilters?.length ?? 0) > 0;

toast.info(
hasAttributeFilters
? "No neighbors matched your filters"
: "No more neighbors to expand",
);
return;
}

Expand Down Expand Up @@ -166,7 +172,14 @@ export default function useExpandNode() {
const combined = await expandPromise;

if (combined.vertices.length + combined.edges.length <= 0) {
toast.info("No more neighbors to expand");
const hasAttributeFilters = (filters.attributeFilters?.length ?? 0) > 0;

toast.info(
hasAttributeFilters
? "No neighbors matched your filters"
: "No more neighbors to expand",
);

return;
}

Expand Down