Ngx-bootstrap: ModalOptions "id" not filled with unique number

Created on 12 Oct 2020  路  4Comments  路  Source: valor-software/ngx-bootstrap

ngx-bootstrap: 6.1.0
Angular: 10

When doing modalservice.show, the "id" property is always filled with same value, causing problems when hiding one specific instance.
According to documentation: Allow user to ID for the modal. Otherwise, a unique number will be given, but its not what's happening.

comp(modal) issue

Most helpful comment

This happened to us as well today, we spent much time debugging it :( I created a reproducible example here https://github.com/luca-nardelli/ngx-bootstrap-modal-issue

I wasn't able to make stackblitz work with Ivy, but cloning the repo and running ng-serve should be sufficient

All 4 comments

This happened to us as well today, we spent much time debugging it :( I created a reproducible example here https://github.com/luca-nardelli/ngx-bootstrap-modal-issue

I wasn't able to make stackblitz work with Ivy, but cloning the repo and running ng-serve should be sufficient

I am also seeing this issue. The problem started when I upgraded to Angular 10 and ngx-bootstrap 6.1.0. Modals that used to work fine started exhibiting this issue. For now, I am manually assigning unique ids to modals as a work-around.

5939 will fix the issue. It will be apply on next version. Until that, please see https://github.com/valor-software/ngx-bootstrap/issues/5919#issuecomment-700586206 solutions.

Fix is merged and will be released with 6.2 or 7 next week
cc @daniloff200

Was this page helpful?
0 / 5 - 0 ratings