🐛 fix(redis): 防止命名空间行误触批量选择

This commit is contained in:
tianqijiuyun-latiao
2026-07-15 13:31:48 +08:00
parent 6f65f9e7cc
commit 1c1adb8331
2 changed files with 4 additions and 1 deletions

View File

@@ -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);

View File

@@ -135,7 +135,6 @@ export const buildRedisKeyTree = (
nodeType: 'group',
groupName: child.name,
groupLeafCount: child.leafCount,
selectable: false,
descendantRawKeys,
children,
};