I am trying to test passing parameters from a function to another function on mouse click but I am getting a
"Uncaught TypeError: this.updateList is not a function"
I want to pass the updateList() function the index of the object that is clicked. I am unsure why this is happening. Any help would be appreciated- here is my code snippet below:
teamAgg.on('click', function(d, i) {
this.updateList(i);
});
};
updateList(i) {
let i = i;
console.log('test: ' + i);
}