vue2-excel-grid 1.1.2 → 1.1.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
|
@@ -1221,6 +1221,7 @@ export default {
|
|
|
1221
1221
|
document.addEventListener('keydown', this.onGlobalKeyDown)
|
|
1222
1222
|
document.addEventListener('mousedown', this._onDocMouseDownForDropdown, true)
|
|
1223
1223
|
window.addEventListener('resize', this.syncHeaderViewportWidth)
|
|
1224
|
+
window.addEventListener('scroll', this._onWindowScrollForDropdown, true)
|
|
1224
1225
|
},
|
|
1225
1226
|
|
|
1226
1227
|
beforeDestroy() {
|
|
@@ -1229,6 +1230,7 @@ export default {
|
|
|
1229
1230
|
document.removeEventListener('keydown', this.onGlobalKeyDown)
|
|
1230
1231
|
document.removeEventListener('mousedown', this._onDocMouseDownForDropdown, true)
|
|
1231
1232
|
window.removeEventListener('resize', this.syncHeaderViewportWidth)
|
|
1233
|
+
window.removeEventListener('scroll', this._onWindowScrollForDropdown, true)
|
|
1232
1234
|
},
|
|
1233
1235
|
|
|
1234
1236
|
methods: {
|
|
@@ -1255,6 +1257,9 @@ export default {
|
|
|
1255
1257
|
if (this.$refs.scrollFooter) this.$refs.scrollFooter.scrollLeft = target.scrollLeft
|
|
1256
1258
|
if (this.$refs.scrollRowHeaders) this.$refs.scrollRowHeaders.scrollTop = target.scrollTop
|
|
1257
1259
|
|
|
1260
|
+
// Close dropdown on scroll — fixed-position dropdown drifts away from the moving cell
|
|
1261
|
+
if (this.selectDropdown) this.closeSelectDropdown()
|
|
1262
|
+
|
|
1258
1263
|
// Throttle reactive state updates + virtual scroll recalc to one rAF per frame
|
|
1259
1264
|
if (!this._scrollRAF) {
|
|
1260
1265
|
this._scrollRAF = requestAnimationFrame(() => {
|
|
@@ -2512,6 +2517,10 @@ export default {
|
|
|
2512
2517
|
this.selectDropdown = null
|
|
2513
2518
|
},
|
|
2514
2519
|
|
|
2520
|
+
_onWindowScrollForDropdown() {
|
|
2521
|
+
if (this.selectDropdown) this.closeSelectDropdown()
|
|
2522
|
+
},
|
|
2523
|
+
|
|
2515
2524
|
_onDocMouseDownForDropdown(e) {
|
|
2516
2525
|
if (!this.selectDropdown) return
|
|
2517
2526
|
const dd = this.$el ? this.$el.querySelector('.eg-select-dropdown') : null
|