Author Topic: Invisible button in toolbar  (Read 1525 times)

lephultp

  • Guest
Invisible button in toolbar
« on: October 14, 2020, 06:37:44 am »
I'm not a pro member. Sorry! I have a issue, help me, thanks!: My button export excel and toolbar are not visible, this is my code.

toolbar: {
        cls: 'pq-toolbar-export',
        items: [
          {
            type: 'button',
            label: 'Export',
            options: { text: true, showLabel: true },
            // icon: 'ui-icon-arrowthickstop-1-s', // fa fa-file-excel-o
            icon: 'ui-icon-document',
            listener: function () {
              // tslint:disable-next-line: ban
              const format = 'xlsx';
              let blob = this.exportData({
                format: format,
                nopqdata: true,
                render: true,
              });
              if (typeof blob === 'string') {
                blob = new Blob([blob]);
              }
              // const FileSaver = require('file-saver');
              saveAs(blob, 'NewArticle.' + format);
            },
          },
        ],
      },
« Last Edit: October 14, 2020, 06:42:05 am by lephultp »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5791
    • View Profile
Re: Invisible button in toolbar
« Reply #1 on: October 14, 2020, 10:02:15 am »
Button in toolbar may be invisible due to conflict with a 3rd party library.

If you are using bootstrap, then check this topic: https://paramquery.com/pro/tutorial#topic-bootstrap