Closed JohanHeyvaert closed 1 month ago
Correction: version 21.1.0 doesn't cause an error but the infinite-scroll is not working. The viewer shows a scrollbar.
Just a wild shot: this
is referenced in a Lambda, so maybe it's an undefined pointer when the callback function is invoked.
Can you send me a reproducer? Because, as you said, it works in my demo - and it's hard to fix a bug I don't even see.
Hello Stephan,
Thanks for your response. Here is a minimal application: https://stackblitz.com/edit/stackblitz-starters-rgnasq?file=src%2Fmain.ts So really nothing special.
Hopefully you've got an idea? Anyway it's not urgent as our current version is working fine.
Thanks in advance.
In the example I forgot to add a ref to the scss in angular.json but that doesn't matter I suppose. It's present in our project anyway.
It's a JavaScript error message, so most likely it's not caused by SCSS.
I've found and solved the bug. Now I know why it's a good idea to react to changes in ngOnChanges()
instead of doing it in a setter of an @Input()
attribute.
Be that as it may, version 21.3.7 fixes the bug.
By the way, the bug also showed in the showcase. I found the same error message in the console.
Great! Thanks for the swift resolution. Maybe you could use input signals? (I don't have the code at hand, maybe not appropriate for this case) By the way, I suppose many people already told you, but this is really a fantastic library. Best regards, Johan
Op vr 30 aug 2024 23:11 schreef Stephan Rauh @.***>:
I've found and solved the bug. Now I know why it's a good idea to react to changes in ngOnChanges() instead of doing it in a setter of an @Input() attribute.
Be that as it may, version 21.3.7 fixes the bug.
By the way, the bug also showed in the showcase. I found the same error message in the console.
— Reply to this email directly, view it on GitHub https://github.com/stephanrauh/ngx-extended-pdf-viewer/issues/2539#issuecomment-2322343409, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADI4IMVWK5XLQBHVQVHPC3TZUDNZZAVCNFSM6AAAAABNJ6H2VSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRSGM2DGNBQHE . You are receiving this because you authored the thread.Message ID: @.***>
Thank you very much for your kind words! That's what keeps me going!
At the moment, I aim to be compatible with Angular 16, so I suppose I can't use input signals. Have they been released officially now? Last thing I heard was they're a preview. Generally speaking, I believe signals are a big step into the right direction, so I look forward to using input signals.
I think they are now official. At least in the docs ( https://angular.dev/guide/signals) I don't see anything mentioned any longer about beta or developer preview. I've been using them since angular 15 and they are really great. 🙂
Op vr 30 aug 2024 23:24 schreef Stephan Rauh @.***>:
Thank you very much for your kind words! That's what keeps me going!
At the moment, I aim to be compatible with Angular 16, so I suppose I can't use input signals. Have they been released officially now? Last thing I heard was they're a preview. Generally speaking, I believe signals are a big step into the right direction, so I look forward to using input signals.
— Reply to this email directly, view it on GitHub https://github.com/stephanrauh/ngx-extended-pdf-viewer/issues/2539#issuecomment-2322357638, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADI4IMRNL2DJICRV6NNUZPLZUDPIDAVCNFSM6AAAAABNJ6H2VSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRSGM2TONRTHA . You are receiving this because you authored the thread.Message ID: @.***>
Correction, since v16 😁
Yeah, version 15 puzzled me - Signals are the reason why I dropped Angular 15 support. :)
Yesterday we updated our packages to angular 18.2.1 and ngx-extended-pdf-viewer 21.3.5 (just now to 21.3.6). In the previous versions pageViewMode infinite-scroll without problems, but now this causes an error:
The document is shown and everything seems to work except for the infinite scroll behaviour: the viewer shows a scrollbar. Without the pageViewMode setting we don't have an error.
We have tried both the stable and the bleeding edge version, same issue.
As we are not doing anything special I don't understand why this works on the example: https://pdfviewer.net/extended-pdf-viewer/infinite-scroll
We don't have the problem with ngx-extended-pdf-viewer versions 20.5.2, 21.0.0, 21.1.0. The issue seems to start in version 21.1.1.
It seems to be caused by this change: https://github.com/stephanrauh/ngx-extended-pdf-viewer/commit/75f2497a87578082846f7e87fee025273f7c4ac4#diff-0d22735be0415662dd0a8a345bd117c5992f317db2da29e67539202efba0f884
But I don't understand why this doesn't work in our application.
Version info
Demo PDF file The problem occurs with all PDF files.