How to use the notification over modal popup
See original GitHub issueAs per the steps mentioned in the notification example, I had set up it in my app component
<simple-notifications [options]="notificationOptions" (onCreate)="onNotificationsCreate($event)" (onDestroy)="onNotificationsDestroy($event)" class="mm-alerts-popup"></simple-notifications>
Now it is showing the notification all over the places wherever it is required. Issue is I have specific page which has a form filling popup (modal) If i want to validate the data i am calling the notification service and showing the message. But as the “simple-notifications” component is at app level, it is showing below the popup/Modal. How i can achieve this? so that at this point i can show this over popup not at below of it.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Alert over Modal - Stack Overflow
You can try putting the alert code in a div inside the modal div itself and keep it hidden and then trigger the...
Read more >How to create alert notifications and modals - Documentation
The concrete notifications use PNotify.js and can be created using the ConcreteAlert ... <?php echo json_encode(t('My dialog modal message.
Read more >What is a Popup Notification? Slider, Modal, Embedded
Modals notifications grasp the attention of the user. They notify them of an error or a state requiring immediate action. They compel the...
Read more >Bootstrap Popup - free examples, templates & tutorial
Responsive Popup built with Bootstrap 5. Examples include modal popup, popup box, notification message popup, alert popup, lightbox popup & popup form.
Read more >Modal - Bootstrap
Clicking on the modal “backdrop” will automatically close the modal. Bootstrap only supports one modal window at a time. Nested modals aren't supported...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
At First: I tried use solution [which suggested by @flauc -> Here ] for change
z-index
style, It works with me, I must overridez-index
of modal background overlay with values less than notification layout plus useViewEncapsulation.None
under Component like this:Style file:
Component class:
But This solution may be bug in case there two pop-up modal into same page (one which override it’s z-index and another with default Bootstrap Modal style), Scenario for Bug: when open First The override Modal style then Open The modal with default Style Will display Background overlay above model view as we use
ViewEncapsulation.None
into Component class.Then: I tried use another solution [which suggested by @JanvanCasteren -> Here ] of put
<simple-notification>
tag with-in Modal view without any style override, it work with me Even this solution was settings duplicate<simple-notification>
tag as the main one setting underapp.Component
class’s view.(There no duplicate notifications will display)Finally: I hope this issue will be solved using Library’s Options without need to try any workaround before 2021
I have <simple-notifications [options]=“notificationOptions”></simple-notifications> included in my appComponents html.
Like @deepender87 states, when using a popup dialog, the notification popups appear behind the dialog.
My solution was to simple add a second simple-notifications element inside the dialogs content section.
In my case (I use primeng dialogs):