Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
useEffect,
useState,
} from "react";
import { Virtuoso } from "react-virtuoso";

import Filter from "../../../common/components/filter.tsx";
import StatusIcon from "../../../common/components/status-icon.tsx";
Expand Down Expand Up @@ -88,14 +89,18 @@ export default function DataTreeView({
)}

<div id="tasks" style={{ marginLeft: "0.7rem" }}>
{filteredStages.map((stage) => (
<TreeNode
key={stage.id}
stage={stage}
selected={String(selected)}
onSelect={handleSelect}
/>
))}
<Virtuoso
useWindowScroll
data={filteredStages}
itemContent={(_: number, stage: StageInfo) => (
<TreeNode
key={stage.id}
stage={stage}
selected={String(selected)}
onSelect={handleSelect}
/>
)}
/>
</div>
</div>
);
Expand Down Expand Up @@ -201,14 +206,18 @@ const TreeNode = memo(function TreeNode({

{hasChildren && isExpanded && (
<div className="pgv-tree-children">
{stage.children.map((child) => (
<TreeNode
key={child.id}
stage={child}
selected={selected}
onSelect={onSelect}
/>
))}
<Virtuoso
useWindowScroll
data={stage.children}
itemContent={(_: number, child: StageInfo) => (
<TreeNode
key={child.id}
stage={child}
selected={selected}
onSelect={onSelect}
/>
)}
/>
</div>
)}
</div>
Expand Down
Loading