Description Usage Arguments Value Creation notes Examples
A shiny Module to create an editable DataTable. It adds buttons at the top of the table for deleting selected rows, undoing, and redoing modifications to the table including deletes, additions, and edits, deletions. Additionally it adds a new row to the front of the dataset that holds a row specific delete and edit buttons.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
id |
id for module. The id should match in both the editDT_ui and editDT_server function calls. |
inputTableFull |
Main input table.Must be initialized with
|
inputModifyPlaceID |
Modify ID. Initialized at 0. Must be passed in a
|
colToDisplay |
Character vector of column names to display in the main table. |
colToEdit |
Character vector of column names that will be editable when an edit button is pressed. |
colWidth |
Named numeric vector for the width of displayed columns. |
colSort |
Named logical vector for whether sorting is enabled on a columns. (Currently Unimplemented) |
indexStart |
Whether the index should start at 0 or 1. If the table contains all new data (i.e. all from a form entry in a current session) set the index to 1, else set it to 0 (the default) |
allowDeletes, allowEdits |
TRUE/FALSE on whether or not to include the edit or delete buttons. Both TRUE by default. |
input, output, session |
Internal parameters for shiny. These don't have to be specified. |
editDT_server retruns a reactiveValues list containing the modified input table named 'tableFull' and the modifyID named 'modifyPlaceID'. These returns are used to allow the main inputs to be adapted and changed inside and outside the module.
This module was first created 2020-12-11 when designing the CovidDataEntry Shiny application.
1 2 3 4 5 6 | ## Not run:
# See the example file in the repo at /dev/02_Example_editDT_shinyModule.R for an example of how this module works
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.