Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.2 file param object with withCredentials causes onLoadSuccess fired infinitely #331

Closed
chinalwb opened this issue Jan 10, 2019 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@chinalwb
Copy link

chinalwb commented Jan 10, 2019

React : 16.6.3
webpack: 4.27
browser: Chrome

With 4.0.2, the following code fires the 'onLoadSuccess' infinitely.

<Document
          file={{
             url: 'https://www.tutorialspoint.com/android/android_tutorial.pdf',
             withCredentials: true, // This causes the issue, without this, it will be OK
          }}
          onLoadSuccess={this.onDocumentLoadSuccess}
        >
          <Page pageNumber={pageNumber}  />
        </Document>
@chinalwb
Copy link
Author

Actually the issue starts from '4.0.0-beta'. 3.0.6 works well to me.

@wojtekmaj
Copy link
Owner

Duplicate of #308

@wojtekmaj wojtekmaj marked this as a duplicate of #308 Jan 10, 2019
@wojtekmaj
Copy link
Owner

Technically it's not a bug, you provide a new config with each render. Although this situation is too common to be ignored, so you'll find the solution in #308, too, until this gets fixed.

@wojtekmaj wojtekmaj added bug Something isn't working duplicate This issue or pull request already exists labels Jan 10, 2019
@chinalwb
Copy link
Author

Thanks! I followed your directions in 308, it works now!

Thanks for the support and this great library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants