From 2b56efdfbdd08f996f99cd12f7afee144c331b34 Mon Sep 17 00:00:00 2001 From: tofulm Date: Tue, 26 Apr 2022 16:41:34 +0200 Subject: [PATCH] on deplace le prise en compte du tri des colonnes, comme cela c'est ok avec les crayons --- js/gamutable.es6.js | 12 +++++------- js/gamutable.js | 30 ++++++++++++++---------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index 8454702..173dd5d 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -259,13 +259,6 @@ let monTableau = { this.vuebloc = data; }); } - setTimeout(() => { - if (this.ordreCol) { - Object.entries(this.ordreCol).forEach(([col, sens]) => { - this.tri(col, sens); - }); - } - }, 500); }, computed: { filtreColVal_visible: function () { @@ -600,6 +593,11 @@ let monTableau = { if (this.nomblocajaxreload) { ajaxReload(this.nomblocajaxreload); } + if (this.ordreCol) { + Object.entries(this.ordreCol).forEach(([col, sens]) => { + this.tri(col, sens); + }); + } console.timeEnd('Chargement de VueJs APRES Ajax'); }); }) diff --git a/js/gamutable.js b/js/gamutable.js index afbfc33..51919f0 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -314,18 +314,6 @@ var monTableau = { _this.vuebloc = data; }); } - - setTimeout(function () { - if (_this.ordreCol) { - Object.entries(_this.ordreCol).forEach(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 2), - col = _ref4[0], - sens = _ref4[1]; - - _this.tri(col, sens); - }); - } - }, 500); }, computed: { filtreColVal_visible: function filtreColVal_visible() { @@ -455,10 +443,10 @@ var monTableau = { var ObfiltreSelect = []; if (this.filtreColSelected) { - Object.entries(this.filtreColSelected).forEach(function (_ref5) { - var _ref6 = _slicedToArray(_ref5, 2), - champ = _ref6[0], - valeurs = _ref6[1]; + Object.entries(this.filtreColSelected).forEach(function (_ref3) { + var _ref4 = _slicedToArray(_ref3, 2), + champ = _ref4[0], + valeurs = _ref4[1]; if (!Array.isArray(valeurs)) { valeurs = [valeurs]; @@ -698,6 +686,16 @@ var monTableau = { ajaxReload(_this4.nomblocajaxreload); } + if (_this4.ordreCol) { + Object.entries(_this4.ordreCol).forEach(function (_ref5) { + var _ref6 = _slicedToArray(_ref5, 2), + col = _ref6[0], + sens = _ref6[1]; + + _this4.tri(col, sens); + }); + } + console.timeEnd('Chargement de VueJs APRES Ajax'); }); }).catch(function (error) {