Web: Files: Fix elementResizeDetector work for not first folder

This commit is contained in:
Alexey Safronov 2022-05-20 16:26:51 +03:00
parent fc4d8ceb3d
commit 81dc197bcf

View File

@ -49,7 +49,7 @@ const FilesTileContainer = ({ filesList, t, sectionWidth }) => {
elementResizeDetector.uninstall(firstRef.current); elementResizeDetector.uninstall(firstRef.current);
}; };
}, [firstRef]); }, [firstRef, filesList]);
const onResize = useCallback(() => { const onResize = useCallback(() => {
const { width } = firstRef.current.getBoundingClientRect(); const { width } = firstRef.current.getBoundingClientRect();