ng2-pdfjs-viewer 25.0.10 → 25.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -861,6 +861,10 @@ class PdfJsViewerComponent {
861
861
  if (changes['pdfSrc'] && !changes['pdfSrc'].firstChange) {
862
862
  // pdfSrc changed after initialization - reload the PDF
863
863
  if (!this.externalWindow) {
864
+ // Show spinner immediately when PDF source changes (Issue #275)
865
+ this.isLoading = true;
866
+ this.hasError = false;
867
+ this.currentErrorMessage = "";
864
868
  // Reset configuration queuing since iframe will reload fresh
865
869
  this.initialConfigQueued = false;
866
870
  this.isPostMessageReady = false;
@@ -1605,6 +1609,10 @@ class PdfJsViewerComponent {
1605
1609
  loadPdf() {
1606
1610
  if (!this.validatePdfSource())
1607
1611
  return;
1612
+ // Show spinner immediately when PDF loading starts (Issue #275)
1613
+ this.isLoading = true;
1614
+ this.hasError = false;
1615
+ this.currentErrorMessage = "";
1608
1616
  this.setupExternalWindow();
1609
1617
  const fileUrl = this.createFileUrl();
1610
1618
  const viewerUrl = this.buildViewerUrl(fileUrl);