Skip to content

Conversation

@cpsievert
Copy link
Collaborator

#3996 changed updateCheckboxInput(label = ) to send a object instead of a string to the front-end; however, the front-end receiveMessage() wasn't updated to handle this new data type.

For a minimal example, this now updates the label correctly (before this PR, it would render as [object Object]

library(shiny)

ui <- fluidPage(
  checkboxInput("foo", "label")
)

server <- function(input, output, session) {
  observe({
    updateCheckboxInput(session, "foo", label = HTML("<i>new label</i>"))
  })
}

shinyApp(ui = ui, server = server)

@cpsievert cpsievert requested a review from Copilot June 20, 2025 19:57

This comment was marked as resolved.

@cpsievert cpsievert merged commit 673be3d into main Jun 20, 2025
12 checks passed
@cpsievert cpsievert deleted the fix/update-checkbox-label branch June 20, 2025 20:15
schloerke added a commit that referenced this pull request Jul 6, 2025
* main: (32 commits)
  Revert the addition of spacing between `icon` and `label` in `actionButton()` (#4248)
  Restrict `icon`/`label` separator spacing to `actionButton()` (#4247)
  Fix front-end action button label updating logic (#4242)
  Update news
  Properly handle undefined value for input subscribe callback (#4243)
  Start new version (#4241)
  v1.11.0 release candidate (#4232)
  Follow up to #3996: fix front-end checkbox label updating logic (#4238)
  feat(InputBinding): subscribe callback now supports event priority (#4211)
  Follow up to #3996 when label is unspecified (i.e., NULL), don't include it in the message (#4237)
  Run routine (#4234)
  chore: #4175 update jquery-ui to 1.14.1 (#4205)
  Update jQuery to 3.7.1 (#3969)
  Fix 404 in example 08_html (shiny.min.css) (#4221)
  Follow up to #3870: fix location of news item (#4233)
  Bugfix for error found in tests (#3870)
  Allow update input labels with HTML (#3996)
  Adds mirai to documentation (#4230)
  family->given for R Core authorship (#4222)
  fix(renderPlot): get interactive plotting working with ggplot2 v4.0 (#4228)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants