We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bcd52db + a452643 commit 1aa0596Copy full SHA for 1aa0596
src/components/toast-bar.tsx
@@ -101,8 +101,10 @@ export const ToastBar: React.FC<ToastBarProps> = React.memo(
101
({ toast, position, ...props }) => {
102
const ref = useCallback((el: HTMLElement | null) => {
103
if (el) {
104
- const boundingRect = el.getBoundingClientRect();
105
- props.onHeight(boundingRect.height);
+ setTimeout(() => {
+ const boundingRect = el.getBoundingClientRect();
106
+ props.onHeight(boundingRect.height);
107
+ });
108
}
109
}, []);
110
0 commit comments