inlinewidgets | R Documentation |
Each function creates a tag list of interactive widgets fitting into a table.
.renderTextInput(.colname, .label, .val, .enable) .renderCheckBox(.colname, .label, .val, .enable) .renderSelect(.colname, .label, .val, .chc, .enable)
.colname |
The name of the column in which the widget is placed |
.label |
A label identifying the expected input to the user |
.val |
A value to set |
.enable |
logical for enabled=TRUE or disabled=FALSE |
.chc |
A list of choices (select widgets, only; see |
To fit it into the table the code created by Shiny has been adapted (at the cost of a dependency to the current Shiny version this package was created for).
.renderTextInput
renders a single test input field to be used inline.
It generates a modified code of this:
<div class="form-group shiny-input-container"> <label class="control-label" id="ColName 2-label" for="ColName 2">...</label> <input id="ColName 2" type="text" class="form-control" value="A"/> </div>
In this case we 1. skip the label, 2. remove the class "form-group" because it just adds a bottom padding, 3.
.renderCheckBox
renders a single check box to be used inline.
.renderSelect
renders a select input to be used inline.
# The original Shiny code in 1.7.1 will be modified for inline use <div class="form-group shiny-input-container"> <label class="control-label" id="id-label" for="id">label</label> <div> <select id="id"> <option value="A" selected>A</option> </select> <script type="application/json" data-for="id" data-nonempty="">{"plugins":["selectize-plugin-a11y"]}</script> </div> </div>
A list()
with a shiny.tag
class.
These are helper functions for the renderRowFunctions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.