react-file-viewer
react-file-viewer copied to clipboard
Multiple photos not working
All images went into the same container pg-photo-container
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?
Any update about this?
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.
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
This PR addresses this issue: https://github.com/plangrid/react-file-viewer/pull/119 Can we review it please?
@thefedoration unfortunalty plangrid abondoned this package
@michaelwolo Are you open to new maintainers?