Fixed #2434 - Toast | z-index shouldn't removed when other toasts are shown

pull/2435/head
Tuğçe Küçükoğlu 2022-04-11 11:58:18 +03:00
parent a4d55c2a1e
commit e446eccf78
1 changed files with 2 additions and 2 deletions

View File

@ -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;
@ -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);
}
},