Open AliKalkandelen opened 5 years ago
Having the same issue with tabs. Did you figure out a workaround?
No unfortunately i haven't found a fix yet
On Wed, Jan 16, 2019 at 2:55 PM afaridanquah notifications@github.com wrote:
Having the same issue with tabs. Did you figure out a workaround?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Merott/nativescript-pdf-view/issues/37#issuecomment-454917375, or mute the thread https://github.com/notifications/unsubscribe-auth/AIP0ZEKnbTzJZuNp8ISvy7i2yu05u_Z5ks5vD4OkgaJpZM4Z4M4V .
-- -"I would love to change the world, but they won't give me the source code"
Found a workaround for it. I passed a key to the component and bind it to a random number. So anytime you click on a tab i generate a random number and pass it as a prop to the component that renders the pdf. Not sure if its the right approach but did the charm.
See below
<PDFView v-show="selectedEvent.agenda && selectedEvent.agenda.filename" row="0" :src="pdfSrc" @load="endLoading" :key="jumperKey">
@AliKalkandelen noticed you just reopened the issue. Did it not work in your case?
@AliKalkandelen noticed you just reopened the issue. Did it not work in your case?
Yes it didnt work. maybe i didnt understand it exactly, could you elaborate on what you did? And im using Angular not vue so there might be a difference
I have same issue. For angular found this workaround:
`constructor( ... private cdr: ChangeDetectorRef, ... ) { }
ngOnInit() { this.page.on('loaded', (data) => { let oldPdfSrc = this.pdfSrc; this.pdfSrc = undefined; this.cdr.detectChanges(); this.pdfSrc = oldPdfSrc; this.cdr.detectChanges(); }); }`
Hello,
Im using a tabview in a page and the Pdf is in one tab and the details of the invoice are in the other tab. ONLY on ios the pdf shows, but when i switch tabs and go back to the pdf the pdf screen is just a gray background you cant see the pdf.
Repro Steps: 1)Open Invoice
2) Click on Details Tab
3)Click back on Invoice Tab
The HTML ↓↓↓↓↓↓↓