fix: [ui:select2] Fixed z-index issue

By attaching it to the modal body if applicable
pull/73/head
Sami Mokaddem 2021-10-20 16:45:51 +02:00
parent e5a958e8c9
commit 43fbdc63f6
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 3 additions and 1 deletions

View File

@ -119,8 +119,10 @@ function initSelect2Picker($select) {
}
return buildTag(state)
}
const $modal = $select.closest('.modal')
$select.select2({
dropdownParent: $modal.length != 0 ? $modal.find('.modal-body') : $(document.body),
placeholder: 'Pick a tag',
tags: true,
width: '100%',

View File

@ -94,7 +94,7 @@ input[type="checkbox"]:disabled.change-cursor {
}
.select2-container {
z-index: 1056;
z-index: 900;
}
.select2-container--bootstrap-5 {