From b6e6764331122afc2a3e63d7a62ec89f605fcf5f Mon Sep 17 00:00:00 2001 From: Srikkanth Mohanasundaram Date: Sat, 19 May 2018 20:30:47 +0530 Subject: [PATCH 1/5] Bug fix --- inst/htmlwidgets/RagGrid.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/inst/htmlwidgets/RagGrid.js b/inst/htmlwidgets/RagGrid.js index 5844a8f..560d1cf 100644 --- a/inst/htmlwidgets/RagGrid.js +++ b/inst/htmlwidgets/RagGrid.js @@ -55,8 +55,11 @@ HTMLWidgets.widget({ sel_handle.set(selectionKeys); } } - sel_handle.setGroup(x.settings.crosstalk_group); - filter_handle.setGroup(x.settings.crosstalk_group); + + if(x.settings.crosstalk_group){ + sel_handle.setGroup(x.settings.crosstalk_group); + filter_handle.setGroup(x.settings.crosstalk_group); + } gridOptions=Object.assign(defaultGridOptions,x.gridOptions); const rowHeaders = Object.keys(data); @@ -77,7 +80,9 @@ HTMLWidgets.widget({ rowHeaders.forEach((rowHeader)=>{ rowData[filedRowHeaderMap[rowHeader]] = data[rowHeader][rowIndex]; }); - rowData.ctKey=x.settings.crosstalk_key[rowIndex]; + if(x.settings.crosstalk_key){ + rowData.ctKey=x.settings.crosstalk_key[rowIndex]; + } rowDataList.push(rowData); } if(x.licenseKey){ From fc509f6325476511c63f8e4fa80d0a046518ca1b Mon Sep 17 00:00:00 2001 From: Srikkanth Mohanasundaram Date: Sat, 19 May 2018 20:35:08 +0530 Subject: [PATCH 2/5] Updates to the description --- DESCRIPTION | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 78c5b57..f14afc3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: RagGrid Type: Package -Title: A Wrapper of the JavaScript Library 'DataTables' +Title: A Wrapper of the JavaScript Library 'ag-Grid'. Version: 0.1.1 Authors@R: c( person("Praveen", "N", email = "npu@live.in", role = c("aut", "cre")), @@ -8,9 +8,9 @@ Authors@R: c( ) Maintainer: Praveen N, Srikkanth M Description: Data objects in R can be rendered as HTML tables using the - JavaScript library 'DataTables' (typically via R Markdown or Shiny). The - 'DataTables' library has been included in this R package. The package name - 'DT' is an abbreviation of 'DataTables'. + JavaScript library 'ag-grid' (typically via R Markdown or Shiny). The + 'ag-grid' library has been included in this R package. The package name + 'RagGrid' is an abbreviation of 'R agGrid'. URL: https://github.com/praveenn-vbi/RagGrid/ BugReports: https://github.com/praveenn-vbi/RagGrid/issues License: MIT From fa58f333b0250f8f7b4acdaae415021325bb0031 Mon Sep 17 00:00:00 2001 From: Srikkanth Mohanasundaram Date: Sat, 19 May 2018 20:37:37 +0530 Subject: [PATCH 3/5] Update RagGrid.js --- inst/htmlwidgets/RagGrid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/htmlwidgets/RagGrid.js b/inst/htmlwidgets/RagGrid.js index 560d1cf..546193f 100644 --- a/inst/htmlwidgets/RagGrid.js +++ b/inst/htmlwidgets/RagGrid.js @@ -7,8 +7,8 @@ HTMLWidgets.widget({ factory: function(el, width, height) { let gridOptions={}; // TODO: define shared variables for this instance - var sel_handle = new crosstalk.SelectionHandle(); - var filter_handle = new crosstalk.FilterHandle(); + const sel_handle = new crosstalk.SelectionHandle(); + const filter_handle = new crosstalk.FilterHandle(); sel_handle.on("change", function(e) { if (e.sender !== sel_handle) { // scatter.clearBrush(); From 9dca773d13de548967613e91c9d45602e3339df0 Mon Sep 17 00:00:00 2001 From: Srikkanth Mohanasundaram Date: Sat, 19 May 2018 20:50:54 +0530 Subject: [PATCH 4/5] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 145639d..c93fa08 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # R agGrid R interface to ag-grid. + +This package provides a function `RagGrid()` to display R data via the [ag-grid](https://www.ag-grid.com/) library. + +## Installation + +We're still actively developing and hopefully it'll be available in CRAN. But feel free to use install from github. +You may install the development version using **devtools**: + +```r + +# or the development version if necessary +devtools::install_github('praveenn-vbi/RagGrid') + +# then try DT::datatable(iris) as a hello world example +``` From a248e95e770b9135842c1f21ded233da3a2526a0 Mon Sep 17 00:00:00 2001 From: Srikkanth Mohanasundaram Date: Sat, 19 May 2018 20:51:59 +0530 Subject: [PATCH 5/5] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c93fa08..110f97f 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,14 @@ This package provides a function `RagGrid()` to display R data via the [ag-grid] ## Installation -We're still actively developing and hopefully it'll be available in CRAN. But feel free to use install from github. +We're still actively developing and hopefully it'll be available in CRAN soon. + +But feel free to install from github. You may install the development version using **devtools**: ```r -# or the development version if necessary +# the development version devtools::install_github('praveenn-vbi/RagGrid') # then try DT::datatable(iris) as a hello world example