Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions frontend/app/element/errorboundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class ErrorBoundary extends React.Component<
}

componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
console.log("ErrorBoundary caught an error:", error, errorInfo);
this.setState({ error: error });
}

Expand Down
10 changes: 9 additions & 1 deletion frontend/app/view/preview/directorypreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,20 @@ function DirectoryTable({

useLayoutEffect(() => {
const rows = table.getRowModel()?.flatRows;
let foundParentDir = false;

for (const row of rows) {
if (row.getValue("name") == "..") {
row.pin("top");
return;
foundParentDir = true;
break;
}
}

// If we didn't find the ".." row, reset the pinning to avoid stale references
if (!foundParentDir) {
table.resetRowPinning();
}
}, [table, data]);
const columnSizeVars = useMemo(() => {
const headers = table.getFlatHeaders();
Expand Down
Loading