react-pdfobject icon indicating copy to clipboard operation
react-pdfobject copied to clipboard

Pass node reference to PDFObject

Open sevdog opened this issue 6 years ago • 1 comments

In v1.1. a custom ID is provided to pdfobject API call this may cause problems if a user forgets to provide containerId property and instantiates two or more <PDFObject />

The target parameter can accept a CSS selector, HTML node, or jQuery object.

A more elegant solution could be to use refs (which are DOM nodes, so are supported by API), this should not cause any problem because componentDidMount will be called after render and the reference should be populated.

sevdog avatar Feb 06 '19 12:02 sevdog

Thanks for issue! indeed, I’ll fix for that.

sugarshin avatar Jul 30 '19 11:07 sugarshin