I am seeking assistance with implementing round borders on my DT table in R. My JavaScript skills are limited, so I would greatly appreciate any help or guidance on how to achieve this.
My current code is as follows:
DT::datatable(
data = iris,
options = list(
initComplete = DT::JS(
"function(settings, json) {",
paste0(
"$(this.api().table().header()).css({
'background-color': 'black',
'color': 'white',
'border-top-left-radius': '4px',
'border-top-right-radius': '4px'
});"
),
"}"
)
)
)
The style attribute border-top-left-radius
does not seem to be effective for creating round corners. I believe a solution like the one provided in this answer using pure JS could resolve the issue, but I need assistance incorporating it into my R code.
Attached is a screenshot of my current table layout, where I aim to have rounded corners at the top left and right rather than sharp edges.