sandanat / vue-pdf-app

VUEjs v2 PDF viewer based on Mozilla's PDFJS
MIT License
223 stars 102 forks source link

Adding Id-Config overrides Config functionality #65

Open dallasbeek opened 3 years ago

dallasbeek commented 3 years ago

:id-config and :config don't play well together. If I have just :config the buttons are removed from the toolbarRight but when I add :id-config the buttons reappear.

Configuration:

Steps to reproduce the problem:

<vue-pdf-app :id-config="pdfIdConfig" :config="pdfConfig" :pdf="pdfDocument" style="height: 75vh;"></vue-pdf-app>
<BButton variant="primary" :id="pdfIdConfig.print">Print</BButton>

  data() {
    return {
      pdfIdConfig: {
        print: "printId",
      },
      pdfConfig: {
        toolbar: {
          toolbarViewerRight: {
            openFile: false,
            viewBookmark: false
          }
        }
      },
    };
  }

What is the expected behavior?

In my example bookmark and file open on toolbar would be hidden and print button would work

What went wrong?

toolbar buttons are not hidden

Attachments (screenshots, links, etc)

sandanat commented 3 years ago

Hi! Yes, I confirm a bug