fix(traceviewer): Fix network log flicker #33929
This commit is contained in:
parent
512cb36c9b
commit
ed7a5a0283
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue