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
8 changes: 7 additions & 1 deletion frontend/app/view/preview/preview-directory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,13 @@ function TableBody({

const allRows = table.getRowModel().flatRows;
const dotdotRow = allRows.find((row) => row.getValue("name") === "..");
const otherRows = allRows.filter((row) => row.getValue("name") !== "..");
const nonDotDotRows = allRows.filter((row) => row.getValue("name") !== "..");
// group directories ahead of files (Windows Explorer style) while keeping the
// active column sort within each group
const otherRows = [
...nonDotDotRows.filter((row) => row.original.isdir),
...nonDotDotRows.filter((row) => !row.original.isdir),
];

return (
<div className="dir-table-body" ref={bodyRef}>
Expand Down