fix(trace-viewer): Fix network log flicker #33929 (#34036)

This commit is contained in:
Adam Gastineau 2024-12-17 05:24:22 -08:00 committed by GitHub
parent 7ce1a540bc
commit aabbcbf41d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ export function useMeasure<T extends Element>() {
const target = ref.current;
if (!target)
return;
const bounds = target.getBoundingClientRect();
setMeasure(new DOMRect(0, 0, bounds.width, bounds.height));
const resizeObserver = new ResizeObserver((entries: any) => {
const entry = entries[entries.length - 1];
if (entry && entry.contentRect)