vue2-excel-grid 2.8.4 → 2.8.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-excel-grid",
3
- "version": "2.8.4",
3
+ "version": "2.8.6",
4
4
  "description": "Excel-style grid component for Vue 2.6.14 with virtual scrolling",
5
5
  "license": "MIT",
6
6
  "author": "Fozilbek Raimberdiyev",
@@ -131,7 +131,7 @@ export default {
131
131
  mounted() {
132
132
  this.$nextTick(() => {
133
133
  if (this.$refs.textInput) {
134
- this.$refs.textInput.focus()
134
+ this.$refs.textInput.focus({ preventScroll: true })
135
135
  this.$refs.textInput.select()
136
136
  }
137
137
  })
@@ -204,7 +204,7 @@ export default {
204
204
  watch: {
205
205
  open(val) {
206
206
  if (val && this.enableSearch) {
207
- this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus() })
207
+ this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus({ preventScroll: true }) })
208
208
  }
209
209
  }
210
210
  },
@@ -215,7 +215,7 @@ export default {
215
215
  this.highlight = selectedIndex
216
216
  this._scrollIndexIntoView(selectedIndex)
217
217
  if (this.enableSearch) {
218
- this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus() })
218
+ this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus({ preventScroll: true }) })
219
219
  }
220
220
  } else {
221
221
  document.addEventListener('click', this._onDocClick)
@@ -228,7 +228,7 @@ export default {
228
228
  watch: {
229
229
  open(val) {
230
230
  if (val && this.enableSearch) {
231
- this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus() })
231
+ this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus({ preventScroll: true }) })
232
232
  }
233
233
  }
234
234
  },
@@ -237,7 +237,7 @@ export default {
237
237
  this._initExpanded()
238
238
  this._scrollIndexIntoView(this.highlight)
239
239
  if (this.enableSearch) {
240
- this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus() })
240
+ this.$nextTick(() => { this.$refs.searchInput && this.$refs.searchInput.focus({ preventScroll: true }) })
241
241
  }
242
242
  } else {
243
243
  document.addEventListener('click', this._onDocClick)
@@ -1425,7 +1425,7 @@ const ExcelGridComponent = {
1425
1425
  * without `:theme.sync` — `.sync` is only needed to reflect the current
1426
1426
  * theme back into the host's own state.
1427
1427
  */
1428
- theme: { type: String, default: 'excel' },
1428
+ theme: { type: String, default: 'antd' },
1429
1429
 
1430
1430
  /**
1431
1431
  * Shows a filter row directly beneath the column headers (inside the
@@ -2417,7 +2417,7 @@ const ExcelGridComponent = {
2417
2417
 
2418
2418
  theme: {
2419
2419
  immediate: true,
2420
- handler(v) { this.internalTheme = v || 'excel' }
2420
+ handler(v) { this.internalTheme = v || 'antd' }
2421
2421
  },
2422
2422
 
2423
2423
  // Runs before the `columns`/`data` watchers below (both call
@@ -3593,7 +3593,7 @@ const ExcelGridComponent = {
3593
3593
  }
3594
3594
  }
3595
3595
  this.hideContextMenu()
3596
- this.$refs.wrapper && this.$refs.wrapper.focus()
3596
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
3597
3597
 
3598
3598
  if (e.ctrlKey || e.metaKey) {
3599
3599
  if (this.selectDropdown) this.closeSelectDropdown()
@@ -4231,7 +4231,7 @@ const ExcelGridComponent = {
4231
4231
  const options = (typeof col.mask === 'string' || Array.isArray(col.mask)) ? { mask: col.mask } : col.mask
4232
4232
  this._maskInput = new MaskInput(input, options)
4233
4233
  }
4234
- input.focus()
4234
+ input.focus({ preventScroll: true })
4235
4235
  if (keepValue) {
4236
4236
  input.setSelectionRange(input.value.length, input.value.length)
4237
4237
  }
@@ -4254,7 +4254,7 @@ const ExcelGridComponent = {
4254
4254
  if (!this.isCellValueValid(row, col, value)) {
4255
4255
  this._showInvalidCell(row, col, value)
4256
4256
  this.editingCell = null
4257
- this.$refs.wrapper && this.$refs.wrapper.focus()
4257
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
4258
4258
  return
4259
4259
  }
4260
4260
 
@@ -4265,14 +4265,14 @@ const ExcelGridComponent = {
4265
4265
  this._emitDataChange(oldData, newData)
4266
4266
  this._flushOnInput(row, col, value, newData[row])
4267
4267
  this.editingCell = null
4268
- this.$refs.wrapper && this.$refs.wrapper.focus()
4268
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
4269
4269
  },
4270
4270
 
4271
4271
  cancelEdit() {
4272
4272
  clearTimeout(this._onInputTimer)
4273
4273
  if (this._maskInput) { this._maskInput.destroy(); this._maskInput = null }
4274
4274
  this.editingCell = null
4275
- this.$refs.wrapper && this.$refs.wrapper.focus()
4275
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
4276
4276
  },
4277
4277
 
4278
4278
  // Fires while the user is actively typing in the plain-text edit input —
@@ -4360,7 +4360,7 @@ const ExcelGridComponent = {
4360
4360
  if (!this.isCellValueValid(row, col, value)) {
4361
4361
  this._showInvalidCell(row, col, value)
4362
4362
  this.editingCell = null
4363
- this.$refs.wrapper && this.$refs.wrapper.focus()
4363
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
4364
4364
  return
4365
4365
  }
4366
4366
  this.invalidCell = null
@@ -4370,7 +4370,7 @@ const ExcelGridComponent = {
4370
4370
  this._emitDataChange(oldData, newData)
4371
4371
  this._flushOnInput(row, col, value, newData[row])
4372
4372
  this.editingCell = null
4373
- this.$refs.wrapper && this.$refs.wrapper.focus()
4373
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
4374
4374
  },
4375
4375
 
4376
4376
  // =========================================================
@@ -4648,7 +4648,7 @@ const ExcelGridComponent = {
4648
4648
  // or keyboard navigation on the grid goes dead until the user clicks a cell.
4649
4649
  closeSelectDropdown() {
4650
4650
  this.selectDropdown = null
4651
- this.$refs.wrapper && this.$refs.wrapper.focus()
4651
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
4652
4652
  },
4653
4653
 
4654
4654
  // =========================================================
@@ -5036,7 +5036,7 @@ const ExcelGridComponent = {
5036
5036
  closeDatePicker() {
5037
5037
  clearTimeout(this._onInputTimer)
5038
5038
  this.datePickerOverlay = null
5039
- this.$refs.wrapper && this.$refs.wrapper.focus()
5039
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
5040
5040
  },
5041
5041
 
5042
5042
  _onWindowScrollForDropdown(e) {
@@ -6805,7 +6805,7 @@ const ExcelGridComponent = {
6805
6805
  // browser leaves focus on document.body (its subtree was removed) and
6806
6806
  // arrow-key navigation goes dead until a cell is clicked again.
6807
6807
  focus() {
6808
- this.$refs.wrapper && this.$refs.wrapper.focus()
6808
+ this.$refs.wrapper && this.$refs.wrapper.focus({ preventScroll: true })
6809
6809
  },
6810
6810
 
6811
6811
  // Public, ref-callable: formats a number with a custom thousands