From 5c06ccaef9d76df5a0c2aace7bdcf1daf393e105 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 14 Apr 2021 11:15:18 +0100 Subject: [PATCH] Update index.js Pass the id of the node that triggered the change --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 4229611..88e87ad 100644 --- a/src/index.js +++ b/src/index.js @@ -216,7 +216,7 @@ Tree.prototype.onItemClick = function(id) { this.setValue(id); this.updateLiElements(); } - onChange && onChange.call(this); + onChange && onChange.call(this, id); console.timeEnd('onItemClick'); };