waiterClass: Waiter R6 Class

Description Details Active bindings Methods Examples

Description

Create a waiter to then show, hide or update its content.

Details

Create an object to show a waiting screen on either the entire application or just a portion of the app by specifying the id. Then show, then hide or meanwhile update the content of the waiter.

Active bindings

fadeout

Set or get the fade out

color

Set or get the background color

image

Set of get the background image

session

Set or get the shiny session

html

Set or get the html content

Methods

Public methods


Method new()

Usage
Waiter$new(
  id = NULL,
  html = NULL,
  color = NULL,
  logo = NULL,
  image = "",
  fadeout = FALSE,
  hide_on_render = !is.null(id),
  hide_on_error = !is.null(id),
  hide_on_silent_error = !is.null(id)
)
Arguments
id

Id, or vector of ids, of element on which to overlay the waiter, if NULL the waiter is applied to the entire body.

html

HTML content of waiter, generally a spinner, see spinners or a list of the latter.

color

Background color of loading screen.

logo

Logo to display. Deprecated.

image

Path to background image of loading screen.

fadeout

Use a fade out effect when the screen is removed. Can be a boolean, or a numeric indicating the number of milliseconds the effect should take.

hide_on_render

Set to TRUE to automatically hide the waiter when the element in id is drawn. Note the latter will work with shiny plots, tables, htmlwidgets, etc. but will not work with arbitrary elements.

hide_on_error, hide_on_silent_error

Whether to hide the waiter when the underlying element throws an error. Silent error are thrown by req and validate.

Details

Create a waiter.

Examples
\dontrun{Waiter$new()}

Method show()

Usage
Waiter$show()
Details

Show the waiter.


Method hide()

Usage
Waiter$hide()
Details

Hide the waiter.


Method update()

Usage
Waiter$update(html = NULL)
Arguments
html

HTML content of waiter, generally a spinner, see spinners.

Details

Update the waiter's html content.


Method print()

Usage
Waiter$print()
Details

print the waiter


Method clone()

The objects of this class are cloneable with this method.

Usage
Waiter$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

1
2
3
4
5
## ------------------------------------------------
## Method `Waiter$new`
## ------------------------------------------------

## Not run: Waiter$new()

waiter documentation built on Jan. 3, 2022, 5:13 p.m.