From 1d60ea6d3eaf9a655cf6ebccb973c3b03ae4969d Mon Sep 17 00:00:00 2001 From: Greg Lin Date: Thu, 23 Nov 2023 23:54:43 -0600 Subject: [PATCH] Temporary workaround for JS() not working since htmlwidgets 1.6.3 --- NEWS.md | 4 ++++ R/reactable.R | 3 +++ 2 files changed, 7 insertions(+) diff --git a/NEWS.md b/NEWS.md index f6e42dae..0528b67e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -32,6 +32,10 @@ methods in the JavaScript API to change the current page or set the current page size. ([#322](https://github.com/glin/reactable/issues/322)) +## Minor improvements and bug fixes + +* Fixed `JS()` not working when `htmlwidgets` 1.6.3 or later is installed. ([#348](https://github.com/glin/reactable/issues/348)) + # reactable 0.4.4 [Documentation - reactable 0.4.4](https://v0-4-4--reactable-docs.netlify.app/) diff --git a/R/reactable.R b/R/reactable.R index 951bc964..f9db953c 100644 --- a/R/reactable.R +++ b/R/reactable.R @@ -776,6 +776,9 @@ reactable <- function( serverMaxRowCount = serverMaxRowCount )) + # Temporary workaround for JS() not working in htmlwidgets 1.6.3 + class(component) <- c(class(component), "list") + htmlwidgets::createWidget( name = "reactable", reactR::reactMarkup(component),