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:
LukeGus committed 2026-09-20 19:06:07 -05:00
1 parent afae2889cb
commit e9fd092ebd
3 files changed
+68 -10

No files matched your search

+5 -1
View File
@@ -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}`;
},
});