vue-table2next 0.0.6 → 0.0.8

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": "vue-table2next",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Datatable component for Vue 2.x",
5
5
  "main": "dist/vuetable-2.js",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  <template v-if="field.children && Array.isArray(field.children)">
46
46
  <component v-for="(fieldChildren, fieldChildrenIndex) in field.children"
47
47
  :is="fieldChildren.name"
48
- :key="'child_td_'+ fieldChildrenIndex"
48
+ :key="'child_td_'+ fieldChildren.name"
49
49
  :row-data="item" :row-index="itemIndex" :row-field="field"
50
50
  :vuetable="vuetable"
51
51
  :class="bodyClass('vuetable-component', field)"
@@ -77,7 +77,7 @@
77
77
  <template v-if="field.children && Array.isArray(field.children)">
78
78
  <td v-for="(fieldChildren, fieldChildrenIndex) in field.children"
79
79
  :class="bodyClass('vuetable-td-'+fieldChildren.name, fieldChildren)"
80
- :key="'child_td_'+ fieldChildrenIndex"
80
+ :key="'child_td_'+ fieldChildren.name"
81
81
  :style="{width: fieldChildren.width}"
82
82
  v-html="renderNormalField(fieldChildren, item)"
83
83
  @click="onCellClicked(item, itemIndex, fieldChildren, $event)"
@@ -373,9 +373,17 @@ export default {
373
373
  return this.tableData && typeof(this.tableData[0][this.trackBy]) !== 'undefined'
374
374
  },
375
375
  countVisibleFields () {
376
- return this.tableFields.filter( (field) => {
377
- return field.visible
378
- }).length
376
+ let count = 0;
377
+
378
+ this.tableFields.forEach(field => {
379
+ if (field.children && Array.isArray(field.children)) {
380
+ count += field.children.length;
381
+ }
382
+
383
+ count++;
384
+ })
385
+
386
+ return count;
379
387
  },
380
388
  countTableData () {
381
389
  if (this.tableData === null) {