allow_if: Allow reactivity to continue in shiny if expression is TRUE

Description Usage Arguments Value Examples

View source: R/utils_helpers.R

Description

Allow reactivity to continue in shiny if expression is TRUE

Usage

1
allow_if(.if, is_shiny = T, ...)

Arguments

.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

Value

Nothing. Will either stop or allow shiny reactivity to continue

Examples

1
2
3
4
5
6
7
8
9
# 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)

brentscott93/lasertrapr documentation built on Jan. 15, 2022, 8:21 p.m.