mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
fix(sidebar): remeasure visible rows after density changes (#1489)
* fix(sidebar): remeasure visible rows after density changes * test(credentials): avoid flaky Ed25519 key generation
This commit is contained in:
1 parent
107cf55d8c
commit
5f3372f9f6
2 files changed
+135
No files matched your search
@@ -861,6 +861,12 @@ export function SidebarTree({
|
||||
// and made the list visibly jump apart on every pointer move.
|
||||
useLayoutEffect(() => {
|
||||
virtualizer.measure();
|
||||
// Rebuild the cleared size cache before measuring the mounted rows again.
|
||||
virtualizer.getTotalSize();
|
||||
// Unchanged rows will not trigger ResizeObserver after their cache is cleared.
|
||||
parentRef.current
|
||||
?.querySelectorAll<HTMLElement>("[data-index]")
|
||||
.forEach((element) => virtualizer.measureElement(element));
|
||||
}, [virtualizer, density, trayTrigger, showTags, showResourceBars]);
|
||||
|
||||
if (loading) {
|
||||
|
||||
Reference in new issue
Block a user