MDe
MDe

Reputation: 2508

R Shiny renderDataTable options

Is there a comprehensive list of option names (and hopefully descriptions) that can be passed to the options argument of renderDataTable() in Shiny?

The option names I've seen used in examples online don't seem to map to the option names on the DataTables options docs (http://datatables.net/reference/option). For example, the pageLength options in DataTables is called iDisplayLength in Shiny.

Upvotes: 16

Views: 25603

Answers (2)

Simon.S.A.
Simon.S.A.

Reputation: 6931

If this setting is located in a separate file that is sourced by your application (for example: my_app.R sources my_module.R where the datatable is created/defined), then you may need to source the separate file manually (or remove the previous sourced versions from the workspace) to get changes in this setting to show up.

For some reason, even if my_app.R sources my_module.R on run time this setting (and other options like it) are not always picked up.

Manual sourcing of the file has not been necessary for me when the datatable is created in my_app.R, ui.R or server.R.

Upvotes: 0

Yihui Xie
Yihui Xie

Reputation: 30114

Shiny has upgraded DataTables from 1.9.x to 1.10.x since shiny 0.10.2, and you can use the options listed at http://datatables.net/reference/option/ if your shiny version is higher than 0.10.2.

Upvotes: 14

Related Questions