I am facing an issue while trying to change a data parameter in my component file:
this.commandList.ListesCommandesATransmettre.forEach(data => {
this.catalogs.forEach(catalog => {
if (catalog.Libelle === data.Catalogue) {
if (catalog.selected === false) {
console.log(data.isSelected)
data.isSelected = false;
console.log(data.isSelected)
console.log(data);
}
}
})
});
Upon running this code, the following is displayed:
true
false
However, despite displaying false
, when checking the value of isSelected
using console.log(data)
, it still shows true
. Can someone help me understand why?