Skip to content

Commit

Permalink
Merge pull request #2435 from tugcekucukoglu/toast
Browse files Browse the repository at this point in the history
Fixed #2434 - Toast | z-index shouldn't removed when other toasts are…
  • Loading branch information
tugcekucukoglu authored Apr 11, 2022
2 parents a4d55c2 + e446ecc commit 6303b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/toast/Toast.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script>
import ToastEventBus from 'primevue/toasteventbus';
import ToastMessage from './ToastMessage.vue';
import {ZIndexUtils,UniqueComponentId} from 'primevue/utils';
import {ZIndexUtils,UniqueComponentId,ObjectUtils} from 'primevue/utils';
var messageIdx = 0;
Expand Down Expand Up @@ -106,7 +106,7 @@ export default {
}
},
onLeave() {
if (this.$refs.container && this.autoZIndex) {
if (this.$refs.container && this.autoZIndex && ObjectUtils.isEmpty(this.messages)) {
ZIndexUtils.clear(this.$refs.container);
}
},
Expand Down

0 comments on commit 6303b5c

Please sign in to comment.