Skip to content

Commit

Permalink
add repaint for chrome
Browse files Browse the repository at this point in the history
Signed-off-by: ananzh <[email protected]>
  • Loading branch information
ananzh committed Nov 18, 2023
1 parent c362f5a commit 3967746
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@
}
}
}

.trigger-reflow {
padding-right: 1px; /* Or any other property that affects layout */
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ export default function DiscoverCanvas({ setHeaderActionMenu, history }: ViewPro

const timeField = indexPattern?.timeFieldName ? indexPattern.timeFieldName : undefined;

useEffect(() => {
if (fetchState.status === ResultStatus.READY) {
const element = document.querySelector('.dscCanvas') as HTMLElement;
if (element) {
element.classList.add('trigger-reflow');
setTimeout(() => {
element.classList.remove('trigger-reflow');
}, 10);
}
}
}, [fetchState.status]);

return (
<EuiPanel
hasBorder={false}
Expand Down

0 comments on commit 3967746

Please sign in to comment.