@everchron/ec-shards 5.0.78 → 5.0.80

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": "@everchron/ec-shards",
3
- "version": "5.0.78",
3
+ "version": "5.0.80",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -202,30 +202,32 @@
202
202
  }
203
203
 
204
204
  this.beingResized = true
205
- const resizedEl = document.querySelector('[data-column="'+ this.computedId +'"]')
206
- const currentColumnWidth = resizedEl.offsetWidth
207
-
208
- /** Emitted when the column has been resized. Returns the new width of the column in pixels. */
209
- this.$emit('resizedWidth', { id: this.id, currentColumnWidth })
210
-
211
- let columnCells = document.querySelectorAll('[data-column="' + this.name.toLowerCase().replace(' ', '-') + '-column-cell"]')
212
- columnCells.forEach(cell => {
213
- // if (cell.parentElement && cell.parentElement.__vue__ && typeof cell.parentElement.__vue__.setWidth === 'function')
214
- // cell.parentElement.__vue__.setWidth(currentColumnWidth)
215
- cell.style.width = `${ currentColumnWidth }px`
216
- })
217
-
218
- // To support resizing other column heads of the same type, to allow more than just the first column from being resizeable
219
- let columnHeads = document.querySelectorAll('[data-headname="' + this.uniformName.toLowerCase() + '"]')
220
- console.log('columnHeads:to:resize', columnHeads, '[data-headname="' + this.uniformName.toLowerCase() + '"]', '(should be 1 if theres 2 and 1 is being resized by the User, only the other should be picked up)')
221
- columnHeads.forEach(cell => {
222
- cell.style.width = `${ currentColumnWidth }px`
205
+ setTimeout(() => {
206
+ const resizedEl = document.querySelector('[data-column="'+ this.computedId +'"]')
207
+ const currentColumnWidth = resizedEl.offsetWidth
208
+
209
+ /** Emitted when the column has been resized. Returns the new width of the column in pixels. */
210
+ this.$emit('resizedWidth', { id: this.id, currentColumnWidth })
211
+
212
+ let columnCells = document.querySelectorAll('[data-column="' + this.name.toLowerCase().replace(' ', '-') + '-column-cell"]')
213
+ columnCells.forEach(cell => {
214
+ // if (cell.parentElement && cell.parentElement.__vue__ && typeof cell.parentElement.__vue__.setWidth === 'function')
215
+ // cell.parentElement.__vue__.setWidth(currentColumnWidth)
216
+ cell.style.width = `${ currentColumnWidth }px`
217
+ })
218
+
219
+ // To support resizing other column heads of the same type, to allow more than just the first column from being resizeable
220
+ let columnHeads = document.querySelectorAll('[data-headname="' + this.uniformName.toLowerCase() + '"]')
221
+ console.log('columnHeads:to:resize', columnHeads, '[data-headname="' + this.uniformName.toLowerCase() + '"]', this.beingResizedName)
222
+ columnHeads.forEach(cell => {
223
+ cell.style.width = `${ currentColumnWidth }px`
224
+ })
225
+
226
+ if (this.fixedLeft)
227
+ this.setCellsFixedLeftOffset()
228
+
229
+ this.beingResized = false
223
230
  })
224
-
225
- if (this.fixedLeft)
226
- this.setCellsFixedLeftOffset()
227
-
228
- setTimeout(() => { this.beingResized = false })
229
231
  },
230
232
 
231
233
  setCellsFixedLeftOffset(){