fix: sur les gros tableau, apres insertion, le temps de calcul pouvait
faire que l'on reserver le LS. Pour eviter, on charge le LS que si l'array table est vide
This commit is contained in:
parent
f332c5f888
commit
8ff4ff86f1
1 changed files with 3 additions and 4 deletions
|
@ -684,6 +684,7 @@ function gererData(data, id = null) {
|
|||
table.value[i] = data[index];
|
||||
} else {
|
||||
table.value.unshift(data[index]);
|
||||
// table.value.push(data[index]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -736,7 +737,8 @@ function chargerJson(id) {
|
|||
} else {
|
||||
let config = localStorage.getItem("header_" + nameLocalStorage);
|
||||
config = recupJson(config);
|
||||
if (config && config.header !== undefined) {
|
||||
if (config && config.header !== undefined && table.value.length === 0) {
|
||||
console.log("charge LS");
|
||||
localforage
|
||||
.getItem(nameLocalStorage)
|
||||
.then(function (data) {
|
||||
|
@ -779,9 +781,6 @@ function chargerJson(id) {
|
|||
const triColLS = localStorage.getItem(
|
||||
"triCol_" + nameLocalStorage
|
||||
);
|
||||
const filtreColLS = localStorage.getItem(
|
||||
"filtreCol_" + nameLocalStorage
|
||||
);
|
||||
|
||||
let Tfiltres = [];
|
||||
if (props.filtreselect) {
|
||||
|
|
Loading…
Add table
Reference in a new issue