@everchron/ec-shards 5.0.70 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everchron/ec-shards",
3
- "version": "5.0.70",
3
+ "version": "5.0.71",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -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,6 +201,7 @@
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
 
@@ -209,8 +215,9 @@
209
215
  cell.style.width = `${ currentColumnWidth }px`
210
216
  })
211
217
 
212
- console.log('headName', '[data-headname="' + this.uniformName.toLowerCase() + '"]')
213
- let columnHeads = document.querySelectorAll('[data-headname="' + this.uniformName.toLowerCase() + '"]')
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() + '"]')
214
221
  console.log('columnHeads', columnHeads)
215
222
  columnHeads.forEach(cell => {
216
223
  cell.style.width = `${ currentColumnWidth }px`
@@ -218,6 +225,8 @@
218
225
 
219
226
  if (this.fixedLeft)
220
227
  this.setCellsFixedLeftOffset()
228
+
229
+ this.beingResized = false
221
230
  },
222
231
 
223
232
  setCellsFixedLeftOffset(){