sugarshin/react-pdfobject

Pass node reference to PDFObject

sevdog opened this issue · 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.

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