valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

Modal events when using the service #5113

Closed Disane87 closed 4 years ago

Disane87 commented 5 years ago

Bug description or feature request:

When using the modal service, its required to get the events onHide, onHidden, onShow & onShown for each modal which ist opened to react on them.

Currently, it is not possible to reliably say which of them has now been closed (or opened). As I've seen, there will be a rework of the modals which will expose those events via the service. Is there any ETA or some other methods to react on a closing event for a specific modal and not all (or a diced one)?

Additionally it would be nice, if the dialogs would return a promise (if they are closed/confirmed).

How do you solve this problem internally? I guess you also need to check if a dialog is closed and which one (since you can have more than one).

Plunker/StackBlitz that reproduces the issue:

I guess there is no further explaination needed.

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 3.2.0 Angular: 7.2.7 Bootstrap: 4.3.1

Build system:

Angular CLI

ludmilanesvitiy commented 5 years ago

Related to #4490

faran52000 commented 5 years ago

Any idea when this would be resolved? seriously need this feature