From d9ac5edf7393446b44b35b870a046fe0c9f23c0a Mon Sep 17 00:00:00 2001 From: Alassane Samba Date: Thu, 31 Oct 2019 19:22:39 +0100 Subject: [PATCH 1/2] disable edit when onEdit==FALSE --- inst/htmlwidgets/reactjson.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inst/htmlwidgets/reactjson.js b/inst/htmlwidgets/reactjson.js index 17ce56c..2adf349 100644 --- a/inst/htmlwidgets/reactjson.js +++ b/inst/htmlwidgets/reactjson.js @@ -30,10 +30,10 @@ HTMLWidgets.widget({ enableClipboard: x.enableClipboard, displayObjectSize: x.displayObjectSize, displayDataTypes: x.displayDataTypes, - onEdit: x.onEdit ? x.onEdit : function(value) {logChange(value,"edit")}, - onAdd: x.onAdd ? x.onAdd : function(value) {logChange(value,"add")}, - onDelete: x.onDelete ? x.onDelete : function(value) {logChange(value,"delete")}, - onSelect: x.onSelect ? x.onSelect : function(value) {logChange(value,"select")}, + onEdit: x.onEdit ? function(value) {logChange(value,"edit")} : x.onEdit, + onAdd: x.onAdd ? function(value) {logChange(value,"add")} : x.onAdd, + onDelete: x.onDelete ? function(value) {logChange(value,"delete")} : x.onDelete, + onSelect: x.onSelect ? function(value) {logChange(value,"select")} : x.onSelect, sortKeys: x.sortKeys } ), From ca58d9539be28da993056eb34ccd0b4963428ca2 Mon Sep 17 00:00:00 2001 From: Alassane Samba Date: Thu, 31 Oct 2019 19:25:54 +0100 Subject: [PATCH 2/2] Update DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index efa2aed..5cc1945 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: listviewer Type: Package Title: 'htmlwidget' for Interactive Views of R Lists -Version: 2.1.0 +Version: 2.1.1 Date: 2018-10-06 Authors@R: c( person("Jos", "de Jong", role = c("aut", "cph"), comment = "jsoneditor.js library in htmlwidgets/jsoneditor, http://github.com/josdejong/jsoneditor/" ),