Skip to content

Commit cf79741

Browse files
committed
reset() didn't work when a sliderInput was initialized with value=NULL; fixes #207
1 parent 629c083 commit cf79741

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: shinyjs
22
Title: Easily Improve the User Experience of Your Shiny Apps in Seconds
3-
Version: 1.1.0.9002
3+
Version: 1.1.0.9003
44
Authors@R: person("Dean", "Attali", email = "[email protected]",
55
role = c("aut", "cre"))
66
Description: Perform common useful JavaScript operations in Shiny apps that will

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
TODO date
44

55
- New feature: add a `refresh()` function (#205)
6+
- Fix bug: `reset()` didn't work when a sliderInput was initialized with `value=NULL` (#207)
67
- Remove commercial license (it was only used because some companies asked for it, but it ended up being a bigger headache for 99% of the community)
78

89
# shinyjs 1.1

inst/srcjs/shinyjs-default-funcs.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,9 @@ shinyjs = function() {
322322
else if (input.children(".js-range-slider").length > 0) {
323323
input = input.children(".js-range-slider");
324324
inputType = "Slider";
325-
inputValue = input.attr('data-from');
325+
if (typeof input.attr('data-from') !== "undefined") {
326+
inputValue = input.attr('data-from');
327+
}
326328
if (typeof input.attr('data-to') !== "undefined") {
327329
inputValue = inputValue + "," + input.attr('data-to');
328330
}

0 commit comments

Comments
 (0)