From 1c1adb8331c30f10ba8f52f1cea358d764985cb6 Mon Sep 17 00:00:00 2001 From: tianqijiuyun-latiao <69459608+tianqijiuyun-latiao@users.noreply.github.com> Date: Wed, 15 Jul 2026 13:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(redis):=20=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4=E8=A1=8C=E8=AF=AF=E8=A7=A6?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/RedisViewer.interaction.test.tsx | 4 ++++ frontend/src/components/redisViewerTree.ts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/RedisViewer.interaction.test.tsx b/frontend/src/components/RedisViewer.interaction.test.tsx index e8d925cd..e8050ec9 100644 --- a/frontend/src/components/RedisViewer.interaction.test.tsx +++ b/frontend/src/components/RedisViewer.interaction.test.tsx @@ -265,6 +265,10 @@ describe('RedisViewer tree interactions', () => { const appGroup = antdState.treeProps.treeData.find((node: any) => node.key === 'group:app'); expect(appGroup).toBeTruthy(); + // rc-tree maps a click on an unselectable, checkable node to onCheck. + // Groups must remain selectable so a row click reaches onSelect (which + // RedisViewer safely ignores for nodes without a raw Redis key). + expect(appGroup.selectable).not.toBe(false); expect(antdState.treeProps.expandedKeys).not.toContain('group:app'); const groupTitle = antdState.treeProps.titleRender(appGroup); diff --git a/frontend/src/components/redisViewerTree.ts b/frontend/src/components/redisViewerTree.ts index 07fb3250..e212ce93 100644 --- a/frontend/src/components/redisViewerTree.ts +++ b/frontend/src/components/redisViewerTree.ts @@ -135,7 +135,6 @@ export const buildRedisKeyTree = ( nodeType: 'group', groupName: child.name, groupLeafCount: child.leafCount, - selectable: false, descendantRawKeys, children, };