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

Close button does not show in header if we add actionButtons. #44

Closed
onkarjanwa opened this issue Nov 3, 2018 · 2 comments
Closed

Close button does not show in header if we add actionButtons. #44

onkarjanwa opened this issue Nov 3, 2018 · 2 comments
Labels

Comments

@onkarjanwa
Copy link

onkarjanwa commented Nov 3, 2018

Here is my code.

this.modalService.openDialog(this.viewRef, {
title: 'Add Delivery Address',
childComponent: OrderPageModelComponent,
settings: {
closeButtonClass: 'btn fa fa-times text-muted bg-white p-0 mt-2',
},
actionButtons: [
{ text: 'Continue', onAction: () => true, buttonClass: 'btn btn-success' }
]
});

If i remove actionButtons property then it does not show close icon in right top.

I am working on Angular7.

@meeroslav
Copy link
Collaborator

This is by design...

There are two modes of the modal dialog:

  1. An info dialog - that can be closed via the close button in the header or
  2. A prompt dialog - that requires an action from the user

Idea was, that if you already have an action, it's more natural to place "Close" or "Cancel" or "No" button next to it.

If this doesn't satisfy your requirements, maybe you can share your use case details.

@meeroslav
Copy link
Collaborator

Duplicate of #41

@meeroslav meeroslav marked this as a duplicate of #41 Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants