diff --git a/packages/frontend/src/components/Gallery.tsx b/packages/frontend/src/components/Gallery.tsx index 4a7b0108f..9b8d4ce30 100644 --- a/packages/frontend/src/components/Gallery.tsx +++ b/packages/frontend/src/components/Gallery.tsx @@ -430,6 +430,11 @@ export default class Gallery extends Component< this.openFullscreenMedia.bind(this), itemsPerRow, }} + itemKey={({ rowIndex, columnIndex, data }) => + data.mediaMessageIds[ + rowIndex * itemsPerRow + columnIndex + ] + } > {GalleryGridCell} @@ -475,7 +480,7 @@ function GalleryGridCell({ return null } return ( -
+
data.mediaMessageIds[index]} > {FileAttachmentRowWrapper} @@ -567,7 +573,7 @@ function FileAttachmentRowWrapper({ return null } return ( -
+