View source: R/utils_helpers.R
allow_if | R Documentation |
Allow reactivity to continue in shiny if expression is TRUE
allow_if(.if, is_shiny = T, ...)
.if |
An expression that returns TRUE/FALSE (to be passed to an internal if statement) |
is_shiny |
A logical. Default is TRUE. |
... |
Additional arguments passed to shinyShowNotification |
Nothing. Will either stop or allow shiny reactivity to continue
# This will stop reactivity and showNotification in UI
allow_if(FALSE, message = 'Oops!', type = 'error')
# This will allow reactivity to continue showing nothing in UI
allow_if(TRUE, message = 'Oops!', type = 'error')
# Practice at consolse with is_shiny = F
allow_if(TRUE, is_shiny = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.