r - Datatable to resize with Window In shiny -


i have datatableoutput in shiny page.the datatable has 20 rows require re-size it's height according size of window it's in, either making smaller or reduce number of rows of datatable object in single page ability scroll others

i not finding info online on how this, need tips

you can define height op datatable , length of page inside options argument of renderdatatable function. example:

shiny::renderdatatable(   dt_out, # datatable return    options = list(scrolly = '800px', pagelength = 1000)    # 800px height of datatable   # 1000 big number make sure rows fit on 1 page )  

more options can found on https://datatables.net/reference/option/


Comments