Skip to content

Commit

Permalink
fix bug: shinyjs functions inside modules using 'selector' instead of…
Browse files Browse the repository at this point in the history
… 'id' didn't work
  • Loading branch information
daattali committed Apr 16, 2018
1 parent 401846b commit 8627e85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: shinyjs
Title: Easily Improve the User Experience of Your Shiny Apps in Seconds
Version: 1.0.1.9001
Version: 1.0.1.9002
Authors@R: person("Dean", "Attali", email = "[email protected]",
role = c("aut", "cre"))
Description: Perform common useful JavaScript operations in Shiny apps that will
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- New fearure: `hide()`/`show()`: only bubble up the DOM tree to the nearest input container if the current element is an input; fixes #153
- New feature: `onevent()` returns the `offsetX` and `offsetY` event properties
- New feature: `onevent()` accepts a `properties` parameter that allows the user to retrieve additional properties that are not whitelisted by default; fixes #159
- Fix bug: shinyjs functions used inside a module with a `selector` argument instead of an `id` argument didn't work

# shinyjs 1.0

Expand Down
2 changes: 1 addition & 1 deletion R/jsFunc-aaa.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jsFuncHelper <- function(fxn, params) {

# respect Shiny modules/namespaces
if (inherits(session , "session_proxy")) {
if ("id" %in% names(params)) {
if ("id" %in% names(params) && !is.null(params[['id']])) {
params[['id']] <- session$ns(params[['id']])
}
}
Expand Down

0 comments on commit 8627e85

Please sign in to comment.