The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Let’s say you already use DT::datatable()
to display
your data, but want to switch to editbl::eDT()
to be able
to edit it. What should you look out for?
eDTOutput()
uses an id
argument instead of
outputId
since it’s actually a shiny
module.eDT()
adds extra (hidden) columns to your
datatable
. Try to format using column names instead of
indexes.datatable
now exists within a module (e.g. child
namespace). This means your own chosen outputId
is now
moduleId-DT
. This influences for example the values
accessible under input
. Example: switch from
input$outputId_cell_clicked
to
input[["moduleId-DT_cell_clicked"]]
.eDT()
accepts all arguments of
DT::datatable()
, but has some different defaults for
convenience.format
argument of eDT()
.Here is an example covering the above:
##
## Attaching package: 'DT'
## The following objects are masked from 'package:shiny':
##
## dataTableOutput, renderDataTable
ui <- fluidPage(DTOutput("DT"))
server <- function(input, output, session){
output$DT <- renderDataTable({
datatable(mtcars) %>%
formatRound('disp', 1)
})
observe({
print(input[["DT_cell_clicked"]])
})
}
shinyApp(ui, server)
Reworked into eDT()
:
ui <- fluidPage(eDTOutput("DT"))
server <- function(input, output, session){
editbl::eDT(
id = "DT",
data = mtcars,
format = function(x){formatRound(x,'disp', 1)})
observe({
print(input[["DT-DT_cell_clicked"]])
})
}
shinyApp(ui, server)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.