mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
fix: Search in side bar shows overlapping hosts when grouped by tags (#1303)
https://github.com/Termix-SSH/Support/issues/1303
This commit is contained in:
1 parent
afae2889cb
commit
e9fd092ebd
3 files changed
+68
-10
No files matched your search
@@ -820,9 +820,13 @@ export function SidebarTree({
|
||||
getItemKey: (index) => {
|
||||
const row = visibleRows[index];
|
||||
if (!row) return index;
|
||||
// Group-by views (e.g. by tags) can list the same host under several
|
||||
// group folders, so parentPath is folded in to keep each occurrence's
|
||||
// key unique -- a shared key across rows made the virtualizer collide
|
||||
// their measured positions and render them stacked on top of each other.
|
||||
return isFolder(row.item)
|
||||
? `folder:${row.item.path ?? row.item.name}`
|
||||
: `host:${row.item.id}`;
|
||||
: `${row.parentPath}>host:${row.item.id}`;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user