au chargemnet ajax, si pas de crayons => on vide l'array, cela peut eviter des pb si changement dans le json, notamment si ajoute autorisation

This commit is contained in:
Christophe 2022-05-10 10:00:27 +02:00
parent 58dbb2efdc
commit 00bed075c6
2 changed files with 12 additions and 0 deletions

View file

@ -511,12 +511,18 @@ let monTableau = {
this.header = config.header;
if (config.crayons !== undefined) {
this.crayons = config.crayons;
} else {
this.crayons = [];
}
if (config.classes !== undefined) {
this.classes = config.classes;
} else {
this.classes = [];
}
if (config.ordreCol !== undefined) {
this.ordreCol = config.ordreCol;
} else {
this.ordreCol = [];
}
if (parseInt(id) > 0) {
if (data.length > 0) {

View file

@ -586,14 +586,20 @@ var monTableau = {
if (config.crayons !== undefined) {
_this4.crayons = config.crayons;
} else {
_this4.crayons = [];
}
if (config.classes !== undefined) {
_this4.classes = config.classes;
} else {
_this4.classes = [];
}
if (config.ordreCol !== undefined) {
_this4.ordreCol = config.ordreCol;
} else {
_this4.ordreCol = [];
}
if (parseInt(id) > 0) {