mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-10 16:53:35 +08:00
🐛 fix(redis): 防止命名空间行误触批量选择
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -135,7 +135,6 @@ export const buildRedisKeyTree = (
|
||||
nodeType: 'group',
|
||||
groupName: child.name,
|
||||
groupLeafCount: child.leafCount,
|
||||
selectable: false,
|
||||
descendantRawKeys,
|
||||
children,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user