prevent expand chevron icon from disappearing

This commit is contained in:
uinstinct 2025-04-10 12:31:37 +05:30
parent 4e8a69ec30
commit 4e05d01651

View file

@ -134,10 +134,10 @@ export function ExpandableToolbarPreview(props: ExpandableToolbarPreviewProps) {
useEffect(() => {
const resizeObserver = new ResizeObserver(() => {
setContentDims({
width: contentRef.current?.scrollWidth ?? 0,
height: contentRef.current?.scrollHeight ?? 0,
});
setContentDims(prevValue => ({
width: contentRef.current?.scrollWidth ?? prevValue.width,
height: contentRef.current?.scrollHeight ?? prevValue.height,
}));
});
if (contentRef.current) {