From 276c891fec96d963a349ddc17f49ec90d2d3f591 Mon Sep 17 00:00:00 2001 From: Carson Date: Fri, 15 Mar 2024 10:17:43 -0500 Subject: [PATCH] Update 158-input-labels to leverage HTML labels --- inst/apps/158-input-labels/app.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inst/apps/158-input-labels/app.R b/inst/apps/158-input-labels/app.R index ca895b9274..4d8c954f80 100644 --- a/inst/apps/158-input-labels/app.R +++ b/inst/apps/158-input-labels/app.R @@ -9,7 +9,7 @@ row <- function(w1, w2) { fluidRow(column2(w1), column2(w2)) } -label_initial <- "An escaped Label" +label_initial <- HTML("An escaped Label") ui <- fluidPage( p("Everytime you click on the button below, it should add labels to the column that doesn't (currently) have labels, and remove labels from the column that does (currently) have labels. Every label should say: '", tags$b(label_initial, .noWS = "outside"), "'."), @@ -135,7 +135,7 @@ server <- function(input, output, session) { shinyjster::shinyjster_server(input, output, session) observeEvent(input$update, { - label1 <- if (isTRUE(input$update %% 2 == 0)) character(0) else "An escaped Label" + label1 <- if (isTRUE(input$update %% 2 == 0)) character(0) else HTML("An escaped Label") updateTextInput(session, "textInput1", label = label1) updateTextAreaInput(session, "textAreaInput1", label = label1) updateNumericInput(session, "numericInput1", label = label1) @@ -149,7 +149,7 @@ server <- function(input, output, session) { updateCheckboxGroupInput(session, "checkboxGroupInput1", label = label1) updateDateInput(session, "dateInput1", label = label1) - label2 <- if (isTRUE(input$update %% 2 > 0)) character(0) else "An escaped Label" + label2 <- if (isTRUE(input$update %% 2 > 0)) character(0) else HTML("An escaped Label") updateTextInput(session, "textInput2", label = label2) updateTextAreaInput(session, "textAreaInput2", label = label2) updateNumericInput(session, "numericInput2", label = label2)