From 313adfc16d8a5f507c191be4d9b04482b2731b33 Mon Sep 17 00:00:00 2001 From: timelyportfolio Date: Sat, 2 Dec 2023 09:19:03 -0600 Subject: [PATCH] add `force = TRUE` for `jsonlite::toJSON` conversion primarily to handle `shiny.tag` as prop #67 --- R/reacttools.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/reacttools.R b/R/reacttools.R index 2f2516e..08999f1 100644 --- a/R/reacttools.R +++ b/R/reacttools.R @@ -145,10 +145,10 @@ createReactShinyInput <- function(inputId, container(id = inputId, class = class), htmltools::tags$script(id = sprintf("%s_value", inputId), type = "application/json", - jsonlite::toJSON(value, auto_unbox = TRUE, null = "null")), + jsonlite::toJSON(value, auto_unbox = TRUE, null = "null", force = TRUE)), htmltools::tags$script(id = sprintf("%s_configuration", inputId), type = "application/json", - jsonlite::toJSON(configuration, auto_unbox = TRUE, null = "null")), + jsonlite::toJSON(configuration, auto_unbox = TRUE, null = "null", force = TRUE)), dependencies ) }