correction select, on ne veut pas les vides

This commit is contained in:
Christophe 2021-05-12 17:36:34 +02:00
parent 1d92b173af
commit e72d155750
2 changed files with 6 additions and 3 deletions

View file

@ -279,13 +279,14 @@ let monTableau = {
TcolValue.push(s.toLowerCase()); TcolValue.push(s.toLowerCase());
} }
}); });
if (TcolValue.length) { if (TcolValue.length) {
if (this.filtreColType[colName] === 'select') { if (this.filtreColType[colName] === 'select') {
console.log(ligne[this.champ_search][colName].toString().toLowerCase());
if ( if (
TcolValue.toString().indexOf( TcolValue.toString().indexOf(
ligne[this.champ_search][colName].toString().toLowerCase() ligne[this.champ_search][colName].toString().toLowerCase()
) === -1 ) === -1 ||
!ligne[this.champ_search][colName].toString().toLowerCase()
) { ) {
rsearch = false; rsearch = false;
} }

View file

@ -339,7 +339,9 @@ var monTableau = {
if (TcolValue.length) { if (TcolValue.length) {
if (_this2.filtreColType[colName] === 'select') { if (_this2.filtreColType[colName] === 'select') {
if (TcolValue.toString().indexOf(ligne[_this2.champ_search][colName].toString().toLowerCase()) === -1) { console.log(ligne[_this2.champ_search][colName].toString().toLowerCase());
if (TcolValue.toString().indexOf(ligne[_this2.champ_search][colName].toString().toLowerCase()) === -1 || !ligne[_this2.champ_search][colName].toString().toLowerCase()) {
rsearch = false; rsearch = false;
} }
} else { } else {