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) => {
143
143
DndDragPreviewSingleImageState | DndDragPreviewMultipleImageState | null
144
144
> ( null ) ;
145
145
// 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 ) ;
147
147
const selectIsSelectedForCompare = useMemo (
148
148
( ) => createSelector ( selectGallerySlice , ( gallery ) => gallery . imageToCompare === imageDTO . image_name ) ,
149
149
[ imageDTO . image_name ]
@@ -246,6 +246,7 @@ export const GalleryImage = memo(({ imageDTO }: Props) => {
246
246
< >
247
247
< Box sx = { galleryImageContainerSX } data-is-dragging = { isDragging } data-image-name = { imageDTO . image_name } >
248
248
< Flex
249
+ ref = { ref }
249
250
role = "button"
250
251
className = { GALLERY_IMAGE_CLASS }
251
252
onMouseOver = { onMouseOver }
@@ -256,7 +257,6 @@ export const GalleryImage = memo(({ imageDTO }: Props) => {
256
257
data-selected-for-compare = { isSelectedForCompare }
257
258
>
258
259
< Image
259
- ref = { ref }
260
260
src = { imageDTO . thumbnail_url }
261
261
w = { imageDTO . width }
262
262
fallback = { < GalleryImagePlaceholder /> }
You can’t perform that action at this time.
0 commit comments