Skip to content

Commit

Permalink
fix: operation tree key conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Jul 4, 2024
1 parent 620caed commit 2dc5595
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions webui/src/components/OperationTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const buildTree = (

return {
title,
key,
key: "i-" + key,
children: buildTreePlan(value),
};
});
Expand Down Expand Up @@ -279,7 +279,7 @@ const buildTree = (
);
}
return {
key,
key: "p-" + key,
title,
children: buildTreeDay(key, value),
};
Expand Down Expand Up @@ -411,7 +411,6 @@ const BackupViewContainer = ({ children }: { children: React.ReactNode }) => {
const ref = useRef<HTMLDivElement>(null);
const innerRef = useRef<HTMLDivElement>(null);
const refresh = useState(0)[1];
const [offset, setOffset] = useState(0);
const [topY, setTopY] = useState(0);
const [bottomY, setBottomY] = useState(0);

Expand All @@ -425,8 +424,6 @@ const BackupViewContainer = ({ children }: { children: React.ReactNode }) => {
// handle scroll events to keep the fixed container in view.
const handleScroll = () => {
const refRect = ref.current!.getBoundingClientRect();
const innerRect = innerRef.current!.getBoundingClientRect();

let wiggle = Math.max(refRect.height - window.innerHeight, 0);
let topY = Math.max(ref.current!.getBoundingClientRect().top, 0);
let bottomY = topY;
Expand Down

0 comments on commit 2dc5595

Please sign in to comment.