vue-table2next 0.0.8 → 0.0.9

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.8",
3
+ "version": "0.0.9",
4
4
  "description": "Datatable component for Vue 2.x",
5
5
  "main": "dist/vuetable-2.js",
6
6
  "license": "MIT",
@@ -353,6 +353,7 @@ export default {
353
353
  lastScrollPosition: 0,
354
354
  scrollBarWidth: '17px', //chrome default
355
355
  scrollVisible: false,
356
+ sortColumnState: 0,
356
357
  $_css: {}
357
358
  }
358
359
  },
@@ -879,6 +880,15 @@ export default {
879
880
  },
880
881
 
881
882
  singleColumnSort (field) {
883
+ this.sortColumnState++;
884
+
885
+ if (this.sortColumnState > 2) {
886
+ this.sortColumnState = 0;
887
+ this.removeSortColumn(0)
888
+
889
+ return;
890
+ }
891
+
882
892
  if (this.sortOrder.length === 0) {
883
893
  // this.clearSortOrder()
884
894
  this.addSortColumn(field, 'asc')
@@ -119,6 +119,11 @@ export default {
119
119
 
120
120
  sortIcon (field) {
121
121
  let cls = this.css.sortableIcon
122
+
123
+ if (this.sortColumnState === 0) {
124
+ return cls;
125
+ }
126
+
122
127
  let i = this.currentSortOrderPosition(field)
123
128
 
124
129
  if (i !== false) {