79555613

Date: 2025-04-04 14:49:36
Score: 1
Natty:
Report link

Just replying to @happyspace and because there are not enough manual or documentation of advanced parameters for shiny datatable

A bit late I guess, but

You can make it work in shiny with, for example:

DT::datatable(  
      data=iris,  
      extensions = 'Buttons',  
      style = 'bootstrap4',  
      options = list(  
      dom="<'row'<'col-md-3'l><'col-md-6'B><'col-md-1'f>><'row'<'col-md-12't>><'row'<'col-md-6'i><'col-md-12'p>>"  
)

You can also wrap the lines to see it better

DT::datatable(  
      data=iris,  
      extensions = 'Buttons',  
      style = 'bootstrap4',  
      options = list(  
      dom="<'row'
        <'col-md-3'l>
        <'col-md-6'B>
        <'col-md-1'f>
        >
        <'row'
        <'col-md-12't>
        >
        <'row'
        <'col-md-6'i>
        <'col-md-12'p>
        >", 
)

'row' starts a new line

'col-md-value' tells the width of each element

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @happyspace
  • Low reputation (1):
Posted by: David Aciole