NEWS.md
getDependency()
no longer includes an absolute src path in its return value. (#384)Added a reportTheme
argument to shinyWidgetOutput()
. If TRUE
, CSS styles of the widget’s output container are made available to shiny::getCurrentOutputInfo()
, making it possible to provide ‘smart’ styling defaults in a renderWidget()
context. (#361)
shinyRenderWidget()
now has a cacheHint
parameter, for use with Shiny’s new bindCache()
function. (#391)
Support a new PACKAGE::widget_html.WIDGETNAME
convention for defining custom widget HTML. This replaces the earlier PACKAGE::WIDGETNAME_html
convention, which continues to work but may be deprecated at some point in the future. The goal for the new convention is to prevent accidentally matching functions that were never intended for this purpose. (Thanks, @thebioengineer!) (#376)
Export the JSEvals
function, allowing other packages to support JS()
in non-widget contexts.
saveWidget()
now file
argument now properly handles relative paths. (#299)
Fixed an issue with passing named function declarations to JS()
and onRender()
(introduced by v1.4). (#356)
shiny::uiOutput()
to render a widget) with any version of shiny prior to 1.4. This issue was introduced by htmlwidgets 1.5. (#351)renderValue
calls to occur at an earlier point in Shiny’s initialization process than with earlier versions of Shiny. (#345)onRender()
and JS()
(#329).All files and directories under the inst/htmlwidgets/
directory of a widget package will be copied when a widget is rendered due to an unintended change in #306. Only the single WIDGET.js
file should be copied (where WIDGET
is the widget name). Fixed via #312.
Support for async Shiny. Widget render functions that use the default implementation of htmlwidgets::shinyRenderWidget
can receive promises of widget objects (you can, of course, continue to use regular widget objects as well).
See https://rstudio.github.io/promises for more about async Shiny.
Starting with R 3.4.0, a "Calling ’structure(NULL, *)’ is deprecated" warning would occur when shinyRenderWidget encountered a NULL value. (#269)
Fix edge case where using dynamic HTML dependencies from a widget binding’s JS factory function would fail.
Export getDependency function
onRender
hooks were firing too early when used in Shiny apps.
Widget IDs: only restore random.seed when non-NULL
Pass knitr options to saveWidget
Ensure that scaffoldWidget opens files correctly within RStudio
The resize handler also works for the JavaScript events shown.bs.collapse
and hidden.bs.collapse
now so that widgets inside the Bootstrap collapse class can be displayed
Fix references to vignettes in documentation
Add elementId parameter to widget function generated by scaffoldWidget
More robust method of generating unique widget IDs
Modify advanced and sizing vignettes to use new style widget declarations
Introduce new scheme for defining JavaScript bindings that will make it easier for widgets to gain access to other widget instances on the page.
Add onRender
hook for widgets to execute custom JavaScript code after rendering.
Add appendContent
and prependContent
functions for adding HTML to a widget rendered in a static context (i.e. R console or Rmd)
Fix a bug where the string "