reobserve elements when children change (#54827)

This commit is contained in:
Ashley Harrison 2022-09-07 15:07:35 +01:00 committed by GitHub
parent 762432a921
commit 8e8d0a08f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ export const ToolbarButtonRow = forwardRef<HTMLDivElement, Props>(
});
}
return () => intersectionObserver.disconnect();
}, []);
}, [children]);
return (
<div ref={containerRef} className={cx(styles.container, className)} {...rest}>