Description Details Public fields Methods
R6 Class that is the work horse of the shiny.forms package
R6 Class that is the work horse of the shiny.forms package
This is to help modulize code in order to keep objects self contained, but also convienent to read from.
id
element id that is assigned by the user. depending on how nested the module is, this may not be the id represented on the DOM due to namespacing of moduleServer
inner_id
an id that is used within $ui
that is
may be of some care for the user.
new()
Create a ShinyModule object
ShinyModule$new(id)
id
Set the value of $id
field
call()
Call moduleServer which inacts
this modules private$server
function with
$id
as the namespace.
ShinyModule$call()
ui()
generate the UI associated with this ShinyModule object.
ShinyModule$ui(id = self$id)
id
the id to use as a namespace from NS
defaults to $id
field.
remove()
Function to call to remove this ShinyModule's UI elements and clean up the server side input elements.
ShinyModule$remove(input, session)
reactive()
Function that when called, will create a reactive expression that returns a reference to this ShinyModule Object. Calling this function will enable reactivity on this object. This allows users to set fields as normal values and have more control over when a field should be updated.
ShinyModule$reactive()
invalidate()
Function used to invalidate the private reactive expression.
This should only be called if $reactive
has been called at
the top of the app.
ShinyModule$invalidate()
upgrade()
If an ShinyModule object is ever cached to disk, and the corresponding package is updated with new methods, this function is used to update that object to a newer version if possible. This will call an internal S3 function named upgrade
ShinyModule$upgrade(...)
...
additional arguments to be passed to the internal S3 upgrade method. This exists for future extensibility. For example
clone()
The objects of this class are cloneable with this method.
ShinyModule$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.