From 06d5cdb6a5c51553f8c1cb02866e58b7894be6b4 Mon Sep 17 00:00:00 2001 From: ismirsehregal <36849480+ismirsehregal@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:31:14 +0200 Subject: [PATCH] Update jstreer.js update shiny input on changed.jstree event --- inst/htmlwidgets/jstreer.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/inst/htmlwidgets/jstreer.js b/inst/htmlwidgets/jstreer.js index 2348170..109483b 100644 --- a/inst/htmlwidgets/jstreer.js +++ b/inst/htmlwidgets/jstreer.js @@ -356,7 +356,7 @@ HTMLWidgets.widget({ if(checkboxes) { setShinyValueCheckedNodes(data.instance, leavesOnly); } - //setShinyValue(data.new_instance); // modif 9/10/2023 + setShinyValue(data.instance); } }); @@ -372,17 +372,19 @@ HTMLWidgets.widget({ } // modif 9/10/2023 }); - $el.on("select_node.jstree", function(e, data) { - if(inShiny) { - setShinyValue(data.instance, checkboxes); - } // modif 9/10/2023 - }); - - $el.on("deselect_node.jstree", function(e, data) { - if(inShiny) { - setShinyValue(data.instance, checkboxes); - } // modif 9/10/2023 - }); +/* + $el.on("select_node.jstree", function(e, data) { + if(inShiny) { + setShinyValue(data.instance, checkboxes); + } // modif 9/10/2023 + }); + + $el.on("deselect_node.jstree", function(e, data) { + if(inShiny) { + setShinyValue(data.instance, checkboxes); + } // modif 9/10/2023 + }); +*/ if(!x.checkWithText) { $el.on("check_node.jstree", function(e, data) {