Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

250
Visualizações
Round borders with DT datatables in R

I would like round borders on my DT table. Unfortunately my JS skills are very limited (or even inexistent) thus I would be very happy if somebody could help me to figure out how to implement round borders on a DT table in R.

This is my code so far:

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 last part border-top-left-radius does not work but something like this would be the solution. I think this answer has the solution in pure JS but I need somebody to help me to implement this snippet in my R code.

Here is a screenshot from my code. Now I would like to have the top left and right border with a radius. As you can see the border is 90 degrees at the moment.

still with pointy borders

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You have to use overflow: hidden.

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', 
          'overflow': 'hidden'
          });"
      ),
      "}"
    )
  )
)
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda