diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js
index 7e25ce2..d4836cd 100644
--- a/js/gamutable.es6.js
+++ b/js/gamutable.es6.js
@@ -290,11 +290,21 @@ let monTableau = {
return `crayon ${this.crayons[name]}-${name}-${id}`;
}
},
- tri(col, sens) {
+ tri(col, sens = false) {
const i = this.triProps.indexOf(col);
if (i !== -1) {
+ if (!sens) {
+ sens = 'asc';
+ if (this.triOrders[i] === 'asc') {
+ sens = 'desc';
+ }
+ }
+
this.triOrders[i] = sens;
} else {
+ if (!sens) {
+ sens = 'asc';
+ }
this.triProps.push(col);
this.triOrders.push(sens);
}
@@ -364,7 +374,7 @@ let monTableau = {
-
+
|