@everchron/ec-shards 5.0.69 → 5.0.71
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/dist/ec-shards.common.js +37 -32
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +37 -32
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +1 -1
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/data-grid/data-grid-head-cell.vue +11 -6
package/package.json
CHANGED
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
newSort: this.sorting,
|
|
120
120
|
resizeWidth: null,
|
|
121
121
|
initialized: false,
|
|
122
|
+
beingResized : false,
|
|
122
123
|
cellFixedLeftOffset: ''
|
|
123
124
|
}
|
|
124
125
|
},
|
|
@@ -174,6 +175,10 @@
|
|
|
174
175
|
resizeStyles(){
|
|
175
176
|
if(this.resizable)
|
|
176
177
|
return { resize: 'horizontal', overflow: 'hidden' }
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
beingResizedName(){
|
|
181
|
+
return this.beingResized ? this.uniformName + '-noresize' : this.this.uniformName
|
|
177
182
|
}
|
|
178
183
|
},
|
|
179
184
|
|
|
@@ -196,14 +201,13 @@
|
|
|
196
201
|
return
|
|
197
202
|
}
|
|
198
203
|
|
|
204
|
+
this.beingResized = true
|
|
199
205
|
const resizedEl = document.querySelector('[data-column="'+ this.computedId +'"]')
|
|
200
206
|
const currentColumnWidth = resizedEl.offsetWidth
|
|
201
207
|
|
|
202
208
|
/** Emitted when the column has been resized. Returns the new width of the column in pixels. */
|
|
203
209
|
this.$emit('resizedWidth', { id: this.id, currentColumnWidth })
|
|
204
210
|
|
|
205
|
-
console.log('columnCells', '[data-column="' + this.name.toLowerCase().replace(' ', '-') + '-column-cell"]')
|
|
206
|
-
|
|
207
211
|
let columnCells = document.querySelectorAll('[data-column="' + this.name.toLowerCase().replace(' ', '-') + '-column-cell"]')
|
|
208
212
|
columnCells.forEach(cell => {
|
|
209
213
|
// if (cell.parentElement && cell.parentElement.__vue__ && typeof cell.parentElement.__vue__.setWidth === 'function')
|
|
@@ -211,17 +215,18 @@
|
|
|
211
215
|
cell.style.width = `${ currentColumnWidth }px`
|
|
212
216
|
})
|
|
213
217
|
|
|
214
|
-
|
|
215
|
-
|
|
218
|
+
// To support resizing other column heads of the same type, to allow more than just the first column from being resizeable
|
|
219
|
+
console.log('beingResizedName', '[data-headname="' + this.beingResizedName.toLowerCase() + '"]')
|
|
220
|
+
let columnHeads = document.querySelectorAll('[data-headname="' + this.beingResizedName.toLowerCase() + '"]')
|
|
216
221
|
console.log('columnHeads', columnHeads)
|
|
217
222
|
columnHeads.forEach(cell => {
|
|
218
|
-
// if (cell.parentElement && cell.parentElement.__vue__ && typeof cell.parentElement.__vue__.setWidth === 'function')
|
|
219
|
-
// cell.parentElement.__vue__.setWidth(currentColumnWidth)
|
|
220
223
|
cell.style.width = `${ currentColumnWidth }px`
|
|
221
224
|
})
|
|
222
225
|
|
|
223
226
|
if (this.fixedLeft)
|
|
224
227
|
this.setCellsFixedLeftOffset()
|
|
228
|
+
|
|
229
|
+
this.beingResized = false
|
|
225
230
|
},
|
|
226
231
|
|
|
227
232
|
setCellsFixedLeftOffset(){
|