From 4da5e74d23097961b93c8e7ecfae7a88e5907f30 Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Sat, 7 Jun 2025 03:09:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20feat(table):=20add=20conditional?= =?UTF-8?q?=20row=20expansion=20for=20LogsTable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement rowExpandable property to control which rows can be expanded in the logs table. Rows are now only expandable when they have actual expand data content, preventing empty expansion sections from being displayed to users. - Add rowExpandable function to check if expandData exists and has content - Improve user experience by hiding expand functionality for rows without details - Maintain existing expand behavior for rows with valid expansion data --- web/src/components/table/LogsTable.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/src/components/table/LogsTable.js b/web/src/components/table/LogsTable.js index 21dd5f82..9bdd0ced 100644 --- a/web/src/components/table/LogsTable.js +++ b/web/src/components/table/LogsTable.js @@ -1084,6 +1084,11 @@ const LogsTable = () => { return ; }; + // 检查是否有任何记录有展开内容 + const hasExpandableRows = () => { + return logs.some(log => expandData[log.key] && expandData[log.key].length > 0); + }; + return ( <> {renderColumnSelector()} @@ -1252,8 +1257,10 @@ const LogsTable = () => { >