Skip to content

Properly handle undefined value for input subscribe callback #4243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2025

Conversation

cpsievert
Copy link
Collaborator

Closes #4240

This regression was introduced by #4211, where support for new values for added to InputBinding.subscribe()'s callback. There, I overlooked the fact that we did support no value (i.e., undefined) passed to the .callback(), but the new code wouldn't handle it properly.

Now we properly handle an undefined value (and also type that case properly)

@cpsievert cpsievert requested a review from Copilot June 25, 2025 23:21
Copilot

This comment was marked as resolved.

@cpsievert cpsievert force-pushed the fix/input-subscribe-priority branch from f4cda6c to 846c7cd Compare June 25, 2025 23:25
@cpsievert cpsievert requested review from Copilot and gadenbuie June 25, 2025 23:25
Copilot

This comment was marked as resolved.

Copy link
Member

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I just have one small refactoring comment now that I'm looking at this again

Copy link

@jonthegeek jonthegeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes issues I have with 1.11.0 (other than the issue from #4242). Can you add a test so this bug doesn't make it to CRAN again? It looks like {shinyWidgets} also lacks a lot of tests, so that's how this made it through without revdeps catching it.

@cpsievert cpsievert merged commit 1710316 into main Jun 26, 2025
12 checks passed
@cpsievert cpsievert deleted the fix/input-subscribe-priority branch June 26, 2025 14:36
dmenne added a commit to dmenne/anomanor that referenced this pull request Jun 28, 2025
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.

airDatepickerInput reactivity not working properly in Shiny 1.11.0
3 participants