I am attempting to remove the footer border from a DT:datatable in R.
Upon examining this datatable, I came across this code to get rid of the border (highlighted in red) between the column names and the data:
headerCallback <- c(
"function(thead, data, start, end, display){",
" $('th', thead).css('border-bottom', 'none');",
"}"
),
DT::datatable(
data = myData(),
class = "compact",
rownames = FALSE,
colnames = c("",""),
caption = tags$caption(myTitle, style = "color:black"),
options = list(
dom = 't',
ordering = FALSE,
paging = FALSE,
searching = FALSE,
headerCallback = JS(headerCallback)
)
)
})
My goal is to eliminate the bottom black line as shown in the image. I have found some links that may provide the solution I need, but I am unsure how to integrate them into my current setup:
r - How to remove the horizontal line between the header and the body in a DT::datatable
Inspecting the element on the webpage and expanding <table>
, I can un-check this box to remove the bottom black line. However, I am not sure how to implement this into my current or a new callback function.