Skip to content

Commit

Permalink
provide elementId as argument to jsonedit to help solve #19
Browse files Browse the repository at this point in the history
  • Loading branch information
timelyportfolio committed Oct 31, 2016
1 parent 901e068 commit 8b99050
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: listviewer
Type: Package
Title: 'htmlwidget' for Interactive Views of R Lists
Version: 1.3
Date: 2016-07-08
Version: 1.4.0
Date: 2016-10-31
Authors@R: c(
person("Jos", "de Jong", role = c("aut", "cph"), comment = "jsoneditor.js library in htmlwidgets/jsoneditor, http://github.com/josdejong/jsoneditor/" ),
person("Javier"," Marquez", role = c("aut", "cph"), comment = "react-json library in htmlwidgets/react-json, https://github.com/arqex/reactjson"),
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
@@ -1,3 +1,11 @@
# listviewer 1.4.0

* add `elementId` to the `jsonedit` function

# listviewer 1.3

* add [react-json](https://github.com/arqex/react-json) as an alternate list viewer

# listviewer 1.2

* add RStudio addin capabilities
Expand Down
7 changes: 6 additions & 1 deletion R/jsonedit.R
Expand Up @@ -17,6 +17,9 @@
#' in favor of specific, more self-documenting and helpful arguments.
#' @param width integer in pixels defining the width of the \code{div} container.
#' @param height integer in pixels defining the height of the \code{div} container.
#' @param elementId character to specify valid \code{CSS} id of the
#' htmlwidget for special situations in which you want a non-random
#' identifier.
#' @examples
#' library(listviewer)
#'
Expand Down Expand Up @@ -54,6 +57,7 @@ jsonedit <- function(
, ...
, width = NULL
, height = NULL
, elementId = NULL
) {

# to avoid toJSON keep_vec_names warnings
Expand Down Expand Up @@ -87,7 +91,8 @@ jsonedit <- function(
x,
width = width,
height = height,
package = 'listviewer'
package = 'listviewer',
elementId = elementId
)
}

Expand Down
6 changes: 5 additions & 1 deletion man/jsonedit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8b99050

Please sign in to comment.