Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add buttons to error dialog? #171

Open
smartm0use opened this issue Mar 29, 2016 · 0 comments
Open

How to add buttons to error dialog? #171

smartm0use opened this issue Mar 29, 2016 · 0 comments

Comments

@smartm0use
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant