AbsaOSS / cps-shared-ui

Angular shared components library
https://absaoss.github.io/cps-shared-ui/
Apache License 2.0
2 stars 2 forks source link

closeAll method on CpsDialogService closes only dialogs that were open by the particular instance #367

Closed lukasmatta closed 5 months ago

lukasmatta commented 6 months ago

All the open dialogs should be registered in the service instance that is closest to the root. Calling closeAll should close all the dialogs, not only those that were open by the instance on which the closeAll method is called. Mechanism can be taken from https://github.com/angular/components/blob/9cb07615158c64c0046bdf9bbb5a4b7ec9147c8e/src/cdk/dialog/dialog.ts.

Note that in the material, dialogs that were open by the particular instance are closed when the instance is destroyed, we might also implement this in our library.