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

132
Visualizações
Custom Rendering of Dragula's dragged elements

I know the title is confusing, but basically the problem I'm running into is the following:

Suppose 2 Bootstrap Tables like:

Table 1:

# Title Points
1 Drag 1.00
2 Super 1.00

Table 2:

# Title Points
5 What 1.00
7 Now? 1.00

I want to be able to drag one row from a table into the other. I am able to achieve this with dragula, but when I drag a row (say row 1 in table 1), dragula renders it like this:

1Drag1.00

I would like for it to render like its a row in the table, or at the very least render just the Title field.

I've tried experimenting with the following JS function:

let d = dragula([document.getElementById("table1"), document.getElementById("table2")]);
d.on("drag", (el, source) => {
  let c = document.getElementsByClassName("gu-transit")[0];
  c.outerHTML = "<h1>" + c.innerHTML + "</h1>";
});

but this would always result in an error (probably because .gu-transit isn't in the DOM before this listener is called)

Any feedback would be appreciated!

about 4 years ago · Juan Pablo Isaza
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