amélioration du reset des filtres, pour faire le reset aussi des select/input

This commit is contained in:
Christophe 2022-04-26 15:07:24 +02:00
parent 14fd9efba1
commit 93f302049e
2 changed files with 12 additions and 2 deletions

View file

@ -658,10 +658,14 @@ let monTableau = {
} }
}, },
resetTri() { resetTri() {
this.loadingVueSelect = false;
this.table = orderBy(this.table, ['id'], '', this.champ_search); this.table = orderBy(this.table, ['id'], '', this.champ_search);
this.triOrders = []; this.triOrders = [];
this.triProps = []; this.triProps = [];
this.ordreCol = []; this.ordreCol = [];
Object.keys(this.filtreColType).forEach((col) => {
this.filtreColSelected[col] = [];
});
}, },
selectLigne(id, col) { selectLigne(id, col) {
if (col === 'id' && parseInt(id)) { if (col === 'id' && parseInt(id)) {

View file

@ -765,10 +765,16 @@ var monTableau = {
} }
}, },
resetTri: function resetTri() { resetTri: function resetTri() {
var _this5 = this;
this.loadingVueSelect = false;
this.table = orderBy(this.table, ['id'], '', this.champ_search); this.table = orderBy(this.table, ['id'], '', this.champ_search);
this.triOrders = []; this.triOrders = [];
this.triProps = []; this.triProps = [];
this.ordreCol = []; this.ordreCol = [];
Object.keys(this.filtreColType).forEach(function (col) {
_this5.filtreColSelected[col] = [];
});
}, },
selectLigne: function selectLigne(id, col) { selectLigne: function selectLigne(id, col) {
if (col === 'id' && parseInt(id)) { if (col === 'id' && parseInt(id)) {
@ -782,7 +788,7 @@ var monTableau = {
} }
}, },
exportCSV: function exportCSV() { exportCSV: function exportCSV() {
var _this5 = this; var _this6 = this;
var $csv = []; var $csv = [];
var $header = []; var $header = [];
@ -792,7 +798,7 @@ var monTableau = {
}); });
$tableau = this.tableau.reduce(function (acc, ligne) { $tableau = this.tableau.reduce(function (acc, ligne) {
var $uneLigne = []; var $uneLigne = [];
Object.values(ligne[_this5.champcsv]).forEach(function (l) { Object.values(ligne[_this6.champcsv]).forEach(function (l) {
return $uneLigne.push(l); return $uneLigne.push(l);
}); });
return [].concat(_toConsumableArray(acc), [[].concat($uneLigne)]); return [].concat(_toConsumableArray(acc), [[].concat($uneLigne)]);