fix(traceviewer): Fix network log flicker #33929

This commit is contained in:
Adam Gastineau 2024-12-16 08:33:07 -08:00
parent 512cb36c9b
commit ed7a5a0283

View file

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