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

adds onError prop #17

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

ishpaul777
Copy link
Contributor

@ishpaul777 ishpaul777 commented Apr 2, 2024

Details

Related Issues

GH_LINK n/A

Manual Tests

  1. Follow local testing steps Fix blank area after loading pdf App#38010
  2. Navigate to example directory cd /example && npm i && npm run start
  3. in /example/App.tsx pass a onError prop and shouldShowErrorComponent prop
                  <PDFPreviewer
                        file={file}
                        pageMaxWidth={1000}
                        isSmallScreen={false}
                        containerStyle={pdfPreviewerContainerStyle}
                        shouldShowErrorComponent={false}
                        onLoadError={() => {console.log('onLoadError')}}
                    />
  1. open http://localhost:8080/ and Upload a corrupted pdf given below verify onLoadError prop is triggered.

Corrupted.PDF-2024-02-15_22_51_45.562-2024-03-07_10_43_58.498-2024-03-29_20_41_20.900-2024-04-02 17_03_45.719.pdf

  1. verify no error appears if shouldShowErrorComponent is pass false

Linked PR

Expensify/App#38010

Copy link
Contributor

github-actions bot commented Apr 2, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@ishpaul777
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@ishpaul777 ishpaul777 marked this pull request as ready for review April 2, 2024 18:25
@yuwenmemon yuwenmemon merged commit feb8310 into Expensify:main Apr 3, 2024
2 checks passed
@flodnv flodnv mentioned this pull request Apr 4, 2024
50 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants