react-file-viewer icon indicating copy to clipboard operation
react-file-viewer copied to clipboard

Multiple photos not working

Open rameshbansal opened this issue 6 years ago • 7 comments

All images went into the same container pg-photo-container

rameshbansal avatar Jan 08 '19 10:01 rameshbansal

I ran into this issue as well and think I may have a fix for it.

Was looking into the code and noticed the driver uses document.getElementById to append the images to a <div> with the id pg-photo-container. I think replacing this and using React.createRef() to append the image to the div could solve the issue. Anyone else have any thoughts?

TheThirdDave avatar Jan 16 '19 00:01 TheThirdDave

Any update about this?

basitsattar avatar Apr 09 '19 13:04 basitsattar

Yes! Sorry haven't had a chance to get back to this but I did get the fix working for this.

Haven't made a pull request yet for it though. The fix though is replacing uses of document.getElementById with React References instead.

TheThirdDave avatar Apr 17 '19 19:04 TheThirdDave

yeah, using ids is a big no-go in javascript and in particular in react. Has anyone forked and fixed that? should be really easy though. Will provide a PR soon if the contributors will merge

macrozone avatar Oct 28 '19 22:10 macrozone

This PR addresses this issue: https://github.com/plangrid/react-file-viewer/pull/119 Can we review it please?

thefedoration avatar Aug 16 '20 19:08 thefedoration

@thefedoration unfortunalty plangrid abondoned this package

macrozone avatar Aug 17 '20 09:08 macrozone

@michaelwolo Are you open to new maintainers?

kgdiem avatar Apr 23 '21 00:04 kgdiem