In shiny I have a datatable output that on the first page, the data table and the second page are different, as the first photo below is the first page of the datatable, and the second photo is the second page of the datatable. You can see that the second page has the right line height and width. How do you make every page in the datatable the same
I have also set the line height in the datatable and one more quetion how do I adjust the width for column revenue only become longer and let the other columns have the width with the default settings i tried using
options = list(
columnDefs = list(
list(
targets = c(2, 4),
className = "dt-center",
width = "80px",
),
but it didn't change anything
here's my full code
datatable(df1() %>% mutate(`URL SO` = ifelse(!is.na(`URL SO`), sprintf('<a href="%s">Click Here</a>', `URL SO`), NA)) %>% filter(Brand %in% input$brand, Service %in% input$service, Month %in% input$month),escape = F,
selection = "none",
extensions = "AutoFill",
callback = JS(callback),
options = list(
autoFill = TRUE,
pageLength = 10,
lengthMenu = c(10, 20, 50, 100),
scrollX = TRUE
)) %>%
formatCurrency("Revenue",currency = "Rp. ",digits = 2L,mark = ",") %>%
formatStyle( 0, target= 'row',lineHeight='90%') %>%
formatStyle(
"Due Date", backgroundSize = '98% 88%',
backgroundColor = styleInterval(brks, clrs),
backgroundRepeat = 'no-repeat',
backgroundPosition = 'center'
)
Updated :