How to use differrent Datatable option in R/Shiny ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, r
- Domain
- data-visualization, frontend
Research direction
Start with the datatable() options shown in the issue, especially extensions='Buttons', dom, buttons, and layout, then compare them with the linked DataTables Buttons styling example. Done means explaining or documenting how R/Shiny users position pagination and configure copy, print, and other button icons.
Written by the indexing model from the issue text.
Description
Hi,
I want to customize my DT by modify several options existing DataTable document. But I don't well understand how I can modify in R/shiny .
For example, I want to change the location of pagination, add icon for copy or print button, ...
On datatable pages, I found this kind of information :
new DataTable('#example', {
layout: {
topStart: {
buttons: [
{
extend: 'copyHtml5',
text: '<i class="fa fa-files-o"></i>',
titleAttr: 'Copy'
},
{
extend: 'excelHtml5',
text: '<i class="fa fa-file-excel-o"></i>',
titleAttr: 'Excel'
},
{
extend: 'csvHtml5',
text: '<i class="fa fa-file-text-o"></i>',
titleAttr: 'CSV'
},
{
extend: 'pdfHtml5',
text: '<i class="fa fa-file-pdf-o"></i>',
titleAttr: 'PDF'
}
]
}
}
});
https://datatables.net/extensions/buttons/examples/styling/icons.html
When I try in R, it's not work.
datatable(
mydata,
extensions = 'Buttons',
options = list(
dom = '<"top"fpB>t<"bottom"il>',
buttons = c('copy', 'csv', 'pdf', 'print'),
searchHighlight = TRUE
)
)
I modify, not easily the location of element by dom option by not layout
datatable(
parameters_ui$results,
extensions = 'Buttons',
options = list(
dom = '<"top"fpB>t<"bottom"il>',
buttons = c('copy', 'csv', 'pdf', 'print'),
)
)
datatable(
my_data,
options = list(
layout = list(topstart = 'paging', bottomEnd = NULL)
)
)
Thanks in advance for your help
- Dominant language
- JavaScript
- Stars
- 621
- Forks
- 177
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rstudio/DT
-
Unecessary "Datatables warning" alert when creating a DT with new data and same number of columnsOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Excel like filteringOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
area: bazaar bug complexity: medium
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
accensa/x402-facilitator-stellar#779 ·
Maintainers usually reply within 1 day
-
could-have reliability
Difficulty 1/5 Under an hour Newbie friendliness 88/100