Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

How to add buttons to error dialog? #171

@smartm0use

Description

@smartm0use

Hello, i created the following method:

    function throwErrorDialogFn(message) {
      var dialogTitle = 'Error';
      var dialogMsg = '';

      if (message === 'no-data') {
        dialogMsg = 'No documents';
      } else if (message === 'error') {
        dialogMsg = 'Loading error';
      }
      var dialogOptions = {
        animation: true,
        backdrop: 'static',
        keyboard: false,
        size: 'sm'
      };

      var dialog = dialogs.error(dialogTitle, dialogMsg, dialogOptions);
      dialog.result.then(function(btn) {
        console.log('button1');
      }, function(btn) {
        console.log('button2');
      });
    }

But it displays only the first button. How to enable button 2 or how to add more buttons?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions