@eturnity/eturnity_reusable_components 8.7.5-qa-16-02-21.1 → 8.7.5-qa-16-02-21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -142,6 +142,7 @@
|
|
142
142
|
? 'black'
|
143
143
|
: 'white'
|
144
144
|
"
|
145
|
+
class="rc-select-dropdown"
|
145
146
|
:dropdown-position="dropdownPosition"
|
146
147
|
:font-color="
|
147
148
|
dropdownFontColor ||
|
@@ -854,7 +855,6 @@
|
|
854
855
|
})
|
855
856
|
},
|
856
857
|
clickOutside(event) {
|
857
|
-
console.log('clickOutside')
|
858
858
|
const dropdownRef = this.$refs.dropdown
|
859
859
|
// we need to prevent closing on selecting an option, because in the case of
|
860
860
|
// a disabled option, we don't want to close the dropdown
|
@@ -48,13 +48,13 @@
|
|
48
48
|
props.backdrop == 'dark'
|
49
49
|
? 'rgba(0, 0, 0, 0.4)'
|
50
50
|
: 'rgba(255, 255, 255, 0.9)'};
|
51
|
-
z-index:
|
51
|
+
z-index: 9999999;
|
52
52
|
overflow: auto;
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
`
|
54
|
+
@media (max-width: 425px) {
|
55
|
+
background: white;
|
56
|
+
}
|
57
|
+
`
|
58
58
|
|
59
59
|
const modalContainerAttrs = { overflow: String }
|
60
60
|
const ModalContainer = styled('div', modalContainerAttrs)`
|
@@ -152,22 +152,40 @@
|
|
152
152
|
isOpen: {
|
153
153
|
immediate: true,
|
154
154
|
handler(isOpen) {
|
155
|
-
|
156
|
-
if (isOpen) {
|
157
|
-
window.addEventListener('keydown', this.handleKeyDown)
|
158
|
-
} else {
|
155
|
+
this.setElementsStyle(isOpen)
|
156
|
+
if (!isOpen) {
|
159
157
|
window.removeEventListener('keydown', this.handleKeyDown)
|
160
158
|
}
|
161
159
|
},
|
162
160
|
},
|
163
161
|
},
|
164
162
|
beforeUnmount() {
|
165
|
-
|
163
|
+
this.setElementsStyle(false)
|
166
164
|
window.removeEventListener('keydown', this.handleKeyDown)
|
167
165
|
},
|
168
166
|
methods: {
|
167
|
+
setElementsStyle(isOpen) {
|
168
|
+
this.setSelectDropdownsStyle(isOpen)
|
169
|
+
document.body.style.overflow = isOpen ? 'hidden' : null
|
170
|
+
},
|
171
|
+
setSelectDropdownsStyle(isOpen) {
|
172
|
+
const zIndex = isOpen ? '9999999' : '99999'
|
173
|
+
const items = document.getElementsByClassName('rc-select-dropdown')
|
174
|
+
|
175
|
+
const updateZIndex = () => {
|
176
|
+
Array.from(items).forEach((item) => {
|
177
|
+
item.style.zIndex = zIndex
|
178
|
+
})
|
179
|
+
}
|
180
|
+
|
181
|
+
if (isOpen) {
|
182
|
+
setTimeout(updateZIndex, 100)
|
183
|
+
} else {
|
184
|
+
updateZIndex()
|
185
|
+
}
|
186
|
+
},
|
169
187
|
onCloseModal() {
|
170
|
-
|
188
|
+
this.setElementsStyle(false)
|
171
189
|
this.$emit('on-close')
|
172
190
|
},
|
173
191
|
handleKeyDown({ key }) {
|