correction, il faut tester l'existance du tableau_deux

This commit is contained in:
Christophe 2022-05-09 17:08:56 +02:00
parent 3ff96d4782
commit 72c86e44e3
2 changed files with 9 additions and 4 deletions

View file

@ -863,8 +863,10 @@ const gamuTable = {
this.$refs.montableau.chargerJson(id); this.$refs.montableau.chargerJson(id);
}, },
rechargerJson_deux(id, ajaxCrayons = true) { rechargerJson_deux(id, ajaxCrayons = true) {
this.$refs.montableau.ajaxCrayons = ajaxCrayons; if (this.$refs.montableau_deux) {
this.$refs.montableau_deux.ajaxCrayons = ajaxCrayons;
this.$refs.montableau_deux.chargerJson(id); this.$refs.montableau_deux.chargerJson(id);
}
}, },
}, },
}; };

View file

@ -843,9 +843,12 @@ var gamuTable = {
}, },
rechargerJson_deux: function rechargerJson_deux(id) { rechargerJson_deux: function rechargerJson_deux(id) {
var ajaxCrayons = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var ajaxCrayons = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
this.$refs.montableau.ajaxCrayons = ajaxCrayons;
if (this.$refs.montableau_deux) {
this.$refs.montableau_deux.ajaxCrayons = ajaxCrayons;
this.$refs.montableau_deux.chargerJson(id); this.$refs.montableau_deux.chargerJson(id);
} }
} }
}
}; };
var app = Vue.createApp(gamuTable).component('vue-select', window.VueNextSelect).mount('#app'); var app = Vue.createApp(gamuTable).component('vue-select', window.VueNextSelect).mount('#app');