Add default value for missings
SteEcker opened this issue · comments
SteEcker commented
Hi, thanks for this useful package.
Would it be possible to include an optional argument to the filter function that sets the default value for the missing switch?
e.g. something like this:
filter_data_server <- function(id,
[...],
value_na = c(TRUE, FALSE),
label_na = "NA")
na_filter <- function(id, label = "NA", value = TRUE) {
tags$span(
style = "position: absolute; right: 0px; margin-right: -20px;",
prettySwitch(
inputId = id,
label = label,
value = value ,
slim = TRUE,
status = "primary",
inline = TRUE
)
)
}
Victor Perrier commented
Good suggestion, if you re-install from GitHub filter_data_server()
will have a value_na
argument. Let me know how it works for you.
Victor