File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
invokeai/frontend/web/src/features/gallery/components/ImageGrid Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ export const GalleryImage = memo(({ imageDTO }: Props) => {
143143 DndDragPreviewSingleImageState | DndDragPreviewMultipleImageState | null
144144 > ( null ) ;
145145 // Must use callback ref - else chakra's Image fallback prop will break the ref & dnd
146- const [ element , ref ] = useState < HTMLImageElement | null > ( null ) ;
146+ const [ element , ref ] = useState < HTMLDivElement | null > ( null ) ;
147147 const selectIsSelectedForCompare = useMemo (
148148 ( ) => createSelector ( selectGallerySlice , ( gallery ) => gallery . imageToCompare === imageDTO . image_name ) ,
149149 [ imageDTO . image_name ]
@@ -246,6 +246,7 @@ export const GalleryImage = memo(({ imageDTO }: Props) => {
246246 < >
247247 < Box sx = { galleryImageContainerSX } data-is-dragging = { isDragging } data-image-name = { imageDTO . image_name } >
248248 < Flex
249+ ref = { ref }
249250 role = "button"
250251 className = { GALLERY_IMAGE_CLASS }
251252 onMouseOver = { onMouseOver }
@@ -256,7 +257,6 @@ export const GalleryImage = memo(({ imageDTO }: Props) => {
256257 data-selected-for-compare = { isSelectedForCompare }
257258 >
258259 < Image
259- ref = { ref }
260260 src = { imageDTO . thumbnail_url }
261261 w = { imageDTO . width }
262262 fallback = { < GalleryImagePlaceholder /> }
You can’t perform that action at this time.
0 commit comments