From ce38f979216bd301228ec4e6e96d30bc545786d6 Mon Sep 17 00:00:00 2001 From: "LAPTOP-O016UC3M\\Qi Chen" <16399091+binaricat@users.noreply.github.com> Date: Fri, 19 Dec 2025 12:06:37 +0800 Subject: [PATCH] Moves file table header outside scrollable area Positions the file list's sortable, resizable header above the scroll container instead of inside it to improve visibility and user experience when scrolling through files. Enhances usability by keeping column controls accessible at all times. --- components/SFTPModal.tsx | 116 +++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/components/SFTPModal.tsx b/components/SFTPModal.tsx index fdd1a3f0f..3d3528abe 100644 --- a/components/SFTPModal.tsx +++ b/components/SFTPModal.tsx @@ -1202,6 +1202,64 @@ const SFTPModal: React.FC = ({ + {/* Table Header with sortable columns and resize handles - OUTSIDE scroll container */} + {files.length > 0 && ( +
+
handleSort("name")} + > + {t("sftp.columns.name")} + {sortField === "name" && ( + + {sortOrder === "asc" ? "^" : "v"} + + )} +
handleResizeStart("name", e)} + /> +
+
handleSort("size")} + > + {t("sftp.columns.size")} + {sortField === "size" && ( + + {sortOrder === "asc" ? "^" : "v"} + + )} +
handleResizeStart("size", e)} + /> +
+
handleSort("modified")} + > + {t("sftp.columns.modified")} + {sortField === "modified" && ( + + {sortOrder === "asc" ? "^" : "v"} + + )} +
handleResizeStart("modified", e)} + /> +
+
{t("sftp.columns.actions")}
+
+ )} + {/* File List */}
= ({
)} - {/* Table Header with sortable columns and resize handles */} - {files.length > 0 && ( -
-
handleSort("name")} - > - {t("sftp.columns.name")} - {sortField === "name" && ( - - {sortOrder === "asc" ? "^" : "v"} - - )} -
handleResizeStart("name", e)} - /> -
-
handleSort("size")} - > - {t("sftp.columns.size")} - {sortField === "size" && ( - - {sortOrder === "asc" ? "^" : "v"} - - )} -
handleResizeStart("size", e)} - /> -
-
handleSort("modified")} - > - {t("sftp.columns.modified")} - {sortField === "modified" && ( - - {sortOrder === "asc" ? "^" : "v"} - - )} -
handleResizeStart("modified", e)} - /> -
-
{t("sftp.columns.actions")}
-
- )} - {/* File rows */}