Skip to content

Commit ac15a3d

Browse files
committed
feat: fix grid content switching columns, better preloading
1 parent 106646f commit ac15a3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pexels-grid/src/components/GalleryController.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ export default function GalleryController({
114114
} else {
115115
heights[column] = { height };
116116
}
117-
const galleryHeight = Object
118-
.values(heights)
119-
.sort(({height:heightA}, {height:heightB}) => (heightB - heightA))[0].height;
117+
const galleryHeight = Object.values(heights).sort(
118+
({ height: heightA }, { height: heightB }) => heightB - heightA,
119+
)[0].height;
120120
if (
121121
galleryHeight >= visibleStart &&
122122
startIndex === undefined &&

0 commit comments

Comments
 (0)